If you use:
<Context path="/MyApp" docBase="MyApp" ...
or allow that docBase to be auto-served and have:
CATALINA_HOME/webapps/MyApp
CATALINA_HOME/webapps/MyApp/html/arch.jsp
CATALINA_HOME/webapps/MyApp/WEB-INF
... etc.
then "/html/arch.jsp" is the correct URL.
If you use:
<Context path="" docBase="ROOT" ...
or allow that docBase to be auto and have:
CATALINA_HOME/webapps/ROOT/MyApp
CATALINA_HOME/webapps/ROOT/MyApp/html/arch.jsp
CATALINA_HOME/webapps/ROOT/WEB-INF
... etc.
then "/MyApp/html/arch.jsp" is the correct URL.
In this case MyApp gets treated as an ordinary directory
rather than as a web application.
If the IIS+JRun was working, I would assume you
were using a deployment similar to the later case
above.
Note, you don't state exactly what the servlet is
doing. I could be wrong in my interpretation of what you
mean by "call" in "creating the path to call certain jsp".
I'm assuming a RequestDispatcher include or forward.
Cheers,
Larry
> -----Original Message-----
> From: Marcelo Demestri [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 16, 2002 3:01 PM
> To: Tomcat Users List
> Subject: Re: --- Please helpme: Tomcat visibility (I think!)
>
>
> Thanks Larry for the answer!
>
> I try with "/html/arch.jsp" instead of "/MyApp/html/arch.jsp"
> but still
> don't work.
> By default, it would not have to be "%CATALINA_HOME%/webapps"
> the context
> root? This is correct? I worked with IIS(+JRun), the request
> generated by my
> servlet ("/MyApp/html/arch.jsp") work in this environment,
> and when I began
> with Tomcat I thought that wwwroot=webapps.
> I must migrate all to Apache(1.3.22)+Tomcat(4.0.1) and what
> wanted is not to
> have to modify the servlet (built by other person), and to
> make it work in
> Apache+Tomcat as it works with IIS+JRun.
>
> More suggestions are appreciate!
> Thanks
>
> Marcelo
>
> ----- Original Message -----
> From: "Larry Isaacs" <[EMAIL PROTECTED]>
> To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 16, 2002 5:13 AM
> Subject: RE: --- Please helpme: Tomcat visibility (I think!)
>
>
> > 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]>
> >
> >
>
> --
> 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]>