Hi Carsten,
This works "fine" for me:
*** Inside a servlet (JSP 1.0, JSDK 2.1)
this.getServletContext().getRequestDispatcher("/NoLogin.jsp").forward(request,
response);
***
I say "fine" because if I invalidate the session of the request and then
perform a forward like that, then the session is invalidated in the
server(all its values are removed) but not in the client(the cookie) so
you cannot trust the isNew call of the next request coming from the same
browser. I thought that it might be a JRun bug as nobody in the list
seemed to have this problem but I got last update and its patch two days
ago and the problem still remains so I'm not sure if it's just a JRun's
problem. I created my own workaround and now it's not a problem for me
so I might try to check it with other JSP engines when I have more time.
I hope this helps,
Dan
-------------------------------------------
Daniel Lopez Janariz ([EMAIL PROTECTED])
Web Services
Computer Center
Balearic Islands University
-------------------------------------------
Carsten Heyl wrote:
>
> Craig:
> >Taylor Gautier wrote:
> >
> >> You can't really forward from one JSP to another, because by the time you
> >> get control, it has already opened an output stream on the output socket.
> >>
> >
> >See <jsp:forward>. All you need to do is make sure that the buffer you declar
> e in
> >your "page" directive is large enough that the output hasn't been flushed yet,
> and
> >you can forward JSP->JSP or JSP->servlet.
> >
> >Since a JSP page is compiled into a servlet, it's hardly surprising that the
> >implementation of this uses RequestDispatcher.forward() underneath the covers.
> >This gives you two more forwarding options: servlet->servlet and servlet->JSP
>
> I would like to see an example of forwarding from servlet to jsp.
> Does this work with normal RequestDispatcher on JDSK 2.1?
>
> >
> >Craig McClanahan
> >
> Ciao,
> Carsten
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html