Hi,

I had my tomcat webapp running fine (using Tomcat 8.0.9) in Eclipse Luna,
and I decided to have a play around with the build path. After changing a
few things and then changing everything back to its previous state, I am
now getting an IllegalArgumentException:

"The servlets named [api.rest.BaseServlet] and [src.api.rest.BaseServlet]
are both mapped to the url-pattern [/BaseServlet] which is not permitted"

I understand what the exception is telling me, but I only have one class
named BaseServlet, which is in the api.rest package. I have no idea why
"src" is being prepended to my package name in the second instance above.
Whatever the reason is, it is causing my Tomcat server to not start up.

I have defined the BaseServlet class in my web.xml file as follows:

    <servlet>
        <servlet-name>BaseServlet</servlet-name>
        <servlet-class>api.rest.BaseServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>BaseServlet</servlet-name>
        <url-pattern>/BaseServlet</url-pattern>
    </servlet-mapping>

But as I said, this used to work until today. I must have not changed
something back to its original state in my build path, but I can't figure
out what. I'm hoping I don't have to recreate my project and tomcat server
just to make this work.

Any help is appreciated.

Thanks,
Adam

Reply via email to