Hi,
I am trying to deploy a simple war file into a freshly downloaded tomcat
6.0.18.
I noticed a strange behavior when I tried to configure a virtual host by
changing the Host Name in server.xml from the default "localhost" to "
mydomain.com".

The strange behavior goes like this

1. the web.xml inside my war has a servlet defined which is not presnet in
the war file or any of the libraries tomcat loads.
2. With the default host name as localhost, tomcat does not thrown any
"ClassNotFound" exception for not finding this missing servlet.
3. If i change the host name, tomcat throws a nice

java.lang.ClassNotFoundException: com.psi.servlet.Log4jInitializerServlet
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1094)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)

( Log4jInitializerServlet is my servlet which is missing ).

I can get rid of this error by removing the servlet inclusion block though.

Can any one tell me why the localhost as Host name ignores this error. ?

I can provide more details if wanted.

Thanks,
Anand

Reply via email to