The path for forwarding and including is rooted at and relative to the
current context. So, given
http://server:port/exampes/hello.jsp" the context is 'examples' and you can
forward (or include) to any any other resource that is part of this context.
If you directoiry structure contains this
tomcat/webapps/examples/hello.jsp
goodbye.jsp
/test/fred.jsp
then you could forward to "hello.jsp", "goodbye.jsp" and "test/fred.jsp" and
nowhere else.
Read the spec. for further clarification,
Kevin Jones
DevelopMentor
www.develop.com
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and
> reference [mailto:[EMAIL PROTECTED]]On Behalf Of Louis
> Sent: 23 May 2000 10:35
> To: [EMAIL PROTECTED]
> Subject: Re: How JSP & Servlet Forward work
>
>
> yes, I try this in the first time, I gave absolute path
> "http://server:port/exampes/jsp/jsptoserv/hello.jsp" ,but not work.
>
>
> Regards
> Louis
>
>
>
>
> ----- Original Message -----
> From: Veronique Dupierris <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, May 23, 2000 8:44 AM
> Subject: Re: How JSP & Servlet Forward work
>
>
> > I think you should considere your application context. In this case
> your Web
> > App is example, so you should try :
> "/examples/jsp/jsptoserv/hello.jsp" or
> even
> > "http://server:port/exampes/jsp/jsptoserv/hello.jsp" ....
> >
> > regards
> > veronique
> >
> >
> >
> > Louis a écrit :
> >
> > > I try relative path like these
> > > ../../../examples/jsp/jsptoserv/hello.jsp
> > > ../../examples/jsp/jsptoserv/hello.jsp
> > > ../examples/jsp/jsptoserv/hello.jsp
> > > ../../../jsp/jsptoserv/hello.jsp
> > > ../../jsp/jsptoserv/hello.jsp
> > > ../jsp/jsptoserv/hello.jsp
> > >
> > > unfortunetly, it still not forward it.
> > >
> > > ----- Original Message -----
> > > From: bhupesh vora <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Monday, May 22, 2000 3:06 PM
> > > Subject: Re: How JSP & Servlet Forward work
> > >
> > > > try giving relative path
> > > >
> > > > > -----Original Message-----
> > > > > From: Louis [SMTP:[EMAIL PROTECTED]]
> > > > > Sent: Monday, May 22, 2000 6:57 PM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: How JSP & Servlet Forward work
> > > > >
> > > > > Hi,
> > > > > I try the JSP-Servlet-JSP example in JSWDK-1.0.1. This
> example is
> > > show
> > > > > how to forward from JSP to servlet and forward back to the JSP.
> > > > >
> > > > > I want to know the path working in JSWDK-1.0.1, so I move the
> > > servletToJsp
> > > > > servlet from the default directory
> > > > > (C:\jswdk-1.0.1\examples\WEB-INF\servlets) to a new directory in
> > > > > C:\jswdk-1.0.1\examples\WEB-INF\servlets\com\test\servlet\ .
> > > > > Then I modified the
> > > C:\jswdk-1.0.1\examples\jsp\jsptoservjsptoservlet.jsp
> > > > > file to forward to the servlet.
> > > > >
> > > > > Run the example, the servlet cannot forward back to the
> JSP. I know
> the
> > > > > problem is I need to change the forward path in the servlet class,
> but I
> > > > > try
> > > > > to give a absolute URL, it still cannot forward back to the JSP
> page.
> > > > >
> > > > > Anyone can tell me what the path I need to give?
> > > > >
> > > > >
> > > > > Thanks
> > > > >
> > > > >
> > > > > Louis
> > > > >
> > > > >
> > >
> ==========================================================================
> > > > > =
> > > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > > > > JSP-INTEREST".
> > > > > Some relevant FAQs on JSP/Servlets can be found at:
> > > > >
> > > > > http://java.sun.com/products/jsp/faq.html
> > > > > http://www.esperanto.org.nz/jsp/jspfaq.html
> > > > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > > > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> > > >
> > > >
> > >
> ==================================================================
> =========
> > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > > JSP-INTEREST".
> > > > Some relevant FAQs on JSP/Servlets can be found at:
> > > >
> > > > http://java.sun.com/products/jsp/faq.html
> > > > http://www.esperanto.org.nz/jsp/jspfaq.html
> > > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> > >
> > >
> ==================================================================
> =========
> > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > > Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > > http://java.sun.com/products/jsp/faq.html
> > > http://www.esperanto.org.nz/jsp/jspfaq.html
> > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
> ==================================================================
> =========
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets