[Solved] Error with tomcat [closed]


This is the error here

The servlets named [Book] and [pack2.Book] 
are both mapped to the url-pattern [/Book] which is not permitted

The way what you mapped these servlets in web.xml is not correct.

Your mapping should be

 <servlet>
    <servlet-name>servlet logicalname</servlet-name>
    <servlet-class>Here complete servlet name with package name</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>servlet logicalname</servlet-name>
    <url-pattern>/url pattern</url-pattern>
  </servlet-mapping>

and you can give one url pattern to only one servlet .You can not give same url – pattern to multiple servlets.Check this also

9

solved Error with tomcat [closed]