Issue
I am newbie to servlet/java. I am getting the error "The servlet name already exists" when try to add same servlet name with a new package name. I was with an impression that with a different package name it is possible to add same class name. Please lead me on this.
Solution
Every servlet
must be unique name for each application. When you are creating the servlet using any IDE it will ask servlet name, those name & servlet class and url pattern are configured in web.xml
file. So in single application each & every servlet
identified by unique name, so servlet name must be unique.
Answered By - Maheshwar Ligade
Answer Checked By - Mildred Charles (JavaFixing Admin)