Please look at Web.XML.  You need TWO elements in Web.xml for each server mapping you want to set up.
-----Original Message-----
From: Renato Weiner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 3:35 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Problem with JSP mapping to subdirectory

Hi all,


I'm having a problem using JSP/Servlets in a subdirectory other than root.

To whomever want to test these are the steps:

- httpd.conf:

<VirtualDomain .... >
JkMount /test/*.jsp ajp12
JkMount /servlet_test/* ajp12

</VirtualDomain>

- server.xml

<RequestInterceptor
            className="org.apache.tomcat.request.InvokerInterceptor"
            debug="9" prefix="/servlet_test/" />

....

<Host name="www.name.com">
 <Context path="" docBase="/home/name/public_html/test" debug="9" crossContext="false" reloadable="true" />
</Host>

I can run a servlet since it loads the right web.xml in test.
log:
2001-07-18 19:27:17 - Ctx( ... ): Reading /home/name/public_html/test/WEB-INF/web.xml
URL:
http://www.name.com/servlet_test/MyServlet

But when I try to run a JSP I got a 404 error message. Looking at the logs:

2001-07-18 19:29:18 - Ctx( ... ): Get real path /test/Hello.jsp /home/name/
/public_html/test/test/Hello.jsp /home/name/public_html/test
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2001-07-18 19:29:18 - Ctx( ... ): 404 R(  + /test/Hello.jsp + null) JSP file not found

URL:
http://www.name.com/test/Hello.jsp

Am I doing something wrong ? Or is it a problem??

Renato.



Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 a year!
http://personal.mail.yahoo.com/

Reply via email to