You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gabi <ga...@idieikon.com> on 2004/06/11 09:23:22 UTC

Virtual Host and servlet

Sorry I'm a newbie so I'm asking trivial questions for you but I can't find
the error!!!

If I put my cut&paste servlet from a tutorial I've no proble, it works.
If I use a virtual host, a "not found error" appears.

The web.xml is:
<web-app>
    <display-name>Servlets test</display-name>
    <description>  Examples  </description>
    <servlet>
        <servlet-name>login</servlet-name>
        <servlet-class>chapter2.login</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>login</servlet-name>
        <url-pattern>/servlet/chapter2.login</url-pattern>
    </servlet-mapping>
</web-app>

The virtual host is working (the .jsp page works), I'm using it with apache
through mod_jk
in the http.conf I've put:
JkWorkersFile = ... path and workers.properties it's OK I think
JkLogFile=... it's ok
JkMount /* worker1
and the next line I don't know if it's needed, I've tried with and without
it.
JkMount /servlet/* worker1

The error (translated) is:
javax.servlet.ServletException: (Wrapper) can't find servlet class
chapter2.login or a dependency class...

The servlet is located inside the virtual host root, in a WEB-INF directory,
inside a chapter2 directory, inside is login.class (it's a copy of the
working application inside webapps directory served by Tomcat where it
works, but from Apache it does not work)
The error can be related to an error to find in the path or to a bad mod_jk
parameter/configuration, but ¿where it is?, please help me.

By the way, sorry, I'm a newbie, if some day I become an expert I promise to
help the other newbies!!!


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org