It looks like your relative path should be "/html/arch.jsp", not "/MyApp/html/arch.jsp". When refering to a page within the same web application, you shouldn't include the context name. It worked under ROOT because "/MyApp" in this case isn't a context name but a directory name, making "/MyApp/html/arch.jsp" the correct URL.
Cheers, Larry > -----Original Message----- > From: Marcelo Demestri [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 16, 2002 12:14 PM > To: Tomcat Users List > Subject: --- Please helpme: Tomcat visibility (I think!) > > > Hi all! > I hope that someone can help me, since this is urgent for me. > I have a servlet that processes certain information according > to the data > provided by the user. > My problem is: this servlet, when creating the path to call > certain jsp, > uses a relative path of the type " / MyApp/html/arch.jsp ". > My arch.jsp is > in the path %CATALINA_HOME%/webapps/MyApp/html/arch.jsp > If this structure of directories is not under ROOT (that is to say, > ROOT/MyApp/html/arch.jsp), Tomcat gives back an Error to me > "404 Not Found". > As I said, I have a folder " MyApp " within " /webapps " but > Tomcat does not > find the jsp page. Inclusively I created a context for this > application, but > it does not work. Also it tries servlet mapping within web.xml without > results (good, in fact this is not related to the problem, > since servlet is > located by Tomcat... what it cannot find are the pages jsp). > This is a prove to do anything more general: locate the jsp > pages outside > the structure of directories of Tomcat. > Any advice or suggestions? > Thanks in advance. > > ****************** My Server.xml > <!-- Define the top level container in our container hierarchy --> > <Engine name="Standalone" defaultHost="localhost" debug="0"> > ... > <!-- Define the default virtual host --> > <Host name="localhost" debug="0" appBase="webapps" > unpackWARs="true"> > ... > <Context path="/MyApp" docBase="MyApp" debug="0" > reloadable="true"/> > </Host> > </Engine> > > > ****************** My web.xml > <web-app> > <servlet> > <servlet-name>MyServlet</servlet-name> > <servlet-class>MyServlet</servlet-class> > </servlet> > <servlet-mapping> > <servlet-name>MyServlet</servlet-name> > <url-pattern>/servlet/MyServlet</url-pattern> > </servlet-mapping> > </web-app> > > > Marcelo > > > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
