Craig,
what is the different between <jsp:forward .... /> and sendRedirect() ?
Thansk
"Craig R. McClanahan" wrote:
> "Bailey, Jeff A" wrote:
>
> > Assuming i have this in a file called test.jsp
> >
> > <jsp:forward page="somepage.jsp" />
> >
> > Is there an easy way to update the url so that it shows the true location of
> > the file http://blah.net/somepage.jsp instead of http://blah.net/test.jsp ?
> >
>
> Forwarding happens on the server side, so the client browser is oblivious to it.
> All it knows is that a response was returned for this request. If you really want
> to change the displayed location, use a sendRedirect() call instead, and pay the
> performance price.
>
> >
> > URL rewriting was a possible option but I cant figure out how to make it
> > work if i want to move to a different directory level. (ie <jsp:forward
> > page="/root/somepage.jsp" /> where the current page is located at
> > /root/somedir/someotherdir/test.jsp)
> >
>
> None of this is going to help you change what the location bar in the browser
> shows, for the reason described above. As used in the servlet specification, "URL
> rewriting" is a technique to maintain sessions when cookies are disabled -- it has
> nothing to do with forwarding.
>
> I normally do my web applications in a framed environment, or in a customized
> window with no location bar, to avoid having to worry about this issue. My goal is
> to provide enough GUI controls in the user interface for any navigation the user
> wants (just like you have to do in a classical GUI app), without any reason to care
> about the displayed location, or about the Previous and Next buttons.
>
> >
> > Help :)
> >
> > Thanks in advance
> >
> > Jeff
> >
>
> Craig McClanahan
>
> ===========================================================================
> 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
===========================================================================
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