Another possible solution is to do request.sendRedirect.  This sends a
message back to the browser to go to the new page, and then the browser
will request the new page.  This is obviously much slower however, because
it involves two extra trips between sever and client.
Robert



Niranjan Krishnamoorthy wrote:

> I am using the <jsp:forward> tag and I find that the page gets  to the
new
> page but the http://address shown on the top seems to be the old page.
Has
> anybody else come across this? What do I have to do to get the address
also
> to show the new page.
>

That is what you should expect to see.  The forwarding happens on the
server side,
without any knowledge on the part of the client browser.

>
> Basically I am embedding JavaScript too into this jsp file to check for
> certain values coming from another jsp file. The JavaScript runs but it
> still shows me the same old address in the address box(not the one with
the
> javascript on it).
>

Rather than embedding JavaScript code for this test, which doesn't get
evaluated
until the page is displayed on the browser, you could also pass beans as
request
attributes, or use special query parameters in the <jsp:forward> element,
to
identify where you came from to get here.  That way, the custom evaluation
could
happen on the server side instead, as the second page is being rendered.

===========================================================================
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

Reply via email to