I am unable to use tomcat 3.2.1 with PathInfo and Servlets. I tried with Apache and the mod_jserv-Connector (from Tomcat 3.2.1). When specifing a servlet mapping like .. <servlet-name>net.xx.yy.myservlet</servlet-name> <url-pattern>/servlet/net.xx.yy.myservlet</url-pattern> .. in web.xml I get a 404 from Tomcat when accessing URLs like /servlet/net.xx.yy.myservlet/anyinformation When specifing a mapping like .. <servlet-name>net.xx.yy.myservlet</servlet-name> <url-pattern>/servlet/net.xx.yy.myservlet/*</url-pattern> .. the response is like this: Internal Servlet Error: java.lang.IllegalStateException: Can't happen - classname is null, who added this ? at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at java.lang.RuntimeException.(Compiled Code) at java.lang.IllegalStateException.(Compiled Code) at org.apache.tomcat.core.ServletWrapper.loadServlet(Compiled Code) at org.apache.tomcat.core.ServletWrapper.init(Compiled Code) at org.apache.tomcat.core.Handler.service(Compiled Code) .... As I guess every time a program says "this can't happen" a bug is involved, I felt invited to report it like this. Regards, Georg
With the first mapping - that's exactly what should happen, it's a clear 404 ( you do an exact mapping, it doesn't match ). With the second, again it's an error - the servlet must be declared first with servlet name and servlet class and _then_ use the servlet name. Tomcat has a workaround ( if the servlet class is not declared, it'll use the name ), but it'll still warn. ( the class name is null - probably we need a better message )