tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Layman <>
Subject RE: [Repost] Re: Context problem (I think)
Date Thu, 24 Jan 2002 13:42:12 GMT
    Your problem is the implementation of the original servlet, it is trying
to do a Servlet forward (i.e. using the RequestDispatcher to call forward),
which requires the destination to be in the SAME webapp (which is why you
are getting /ROOT/myApp).  You need to either implement the servlet yourself
or you need to live with the fact that myApp must be a sub-folder of the
context holding the servlet.  Those are the only choices that I see you
having.  Virtual Directories in IIS won't help since the forward call is
internal to Tomcat and the JSP and Servlet specs are pretty clear on how web
apps have to work (and forwarding between them would violate those rules).

-----Original Message-----
From: Marcelo Demestri []
Sent: Thursday, January 24, 2002 2:18 PM
To: Tomcat Users List
Subject: [Repost] Re: Context problem (I think)

    Still I could not solve the problem.
    Please, some suggestion?
    Thanks to all!

    Thanks Dan!
    But I would like not to have to modify the servlet since it's
third-party┬┤s servlet.
    Do you have some solution configuring only the side TC?
    How I do the corresponding thing to "virtual directories" of IIS in TC?
    The only thing that I want to obtain is that TC understands "/myapp"
like a context that it has docBase that I define (i.e.
    Then, when the servlet ask for http://localhost:8080/myapp/some.jsp
(this string is generated by it), TC knows where to find the information (in
this case, the jsp page in "c:/Project/myapp/some.jsp").
    Thanks again for new suggestions.


----- Original Message -----
From: "Dan Miller" < <> >
To: "Tomcat Users List" <
<> >
Sent: Tuesday, January 22, 2002 6:32 PM
Subject: Re: Context problem (I think)
> I would recommend trying something like this, assuming that I have
> understood your question.  First, get the ServletContext that you are
> to access and the forward/include onward.
> Example:
> h.jsp").forward(request, response);
> Dan
> ----- Original Message -----
> From: "Marcelo Demestri" <
<> >
> To: "Tomcat Users List" <
<> >
> Sent: Tuesday, January 22, 2002 8:51 PM
> Subject: Context problem (I think)
> > Hi everybody!
> > I have a little question for you:
> >
> > I have a servlet that responds requests like
> > http://localhost:8080/servlet/myservlet?param1=value1
> > With those parameters he knows what application must deploy. He generate
> > path like this: "/myapp/myarch.jsp"
> > But instead of looking for it within "/myapp", apparently it looks for
> > within "/ROOT/myapp"
> > I want to move my jsp pages outside the "webapps" folder.
> > I try with context:
> >
> > i.e. <Context path="/myapp" docBase="c:/Project/myapp" debug="0"
> > reloadable="true"/>
> >
> > But when my servlet generate the string "/myapp/myarch.jsp", he always
> look
> > into "/ROOT/myapp" instead of  "c:/Project/myapp/".  He doesn't
> > the "/myapp" like a web application (a context).
> > The stranger of all this is that in JRun+IIS (with virtual directories
> > created in < home > of IIS) my servlet works, that is to say, it finds
> > jsp's! And I read Craig in a previous mail say VirtualDirectory
> > (IIS)=Context (TC)
> >
> > Some idea, explanation or suggestion?
> > Very many thanks to all...
> >
> >
> > Marcelo

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message