struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nelson, Laird" <Laird.Nel...@FMR.COM>
Subject RE: query parameters
Date Mon, 09 Dec 2002 16:18:48 GMT
> -----Original Message-----
> From: Anuj Agrawal [mailto:agrawalanuj@yahoo.com]
> However, even in that example, when the
> requestDispatcher.forward(...) is executed, doesn't the 
> browser display the
> URL that the requestDispatcher forwarded to (which would be 
> the JSP page)?

Nope.

> So when the user views the page, they don't know that they had used
> http://your.host/yourServletContext/yourServlet/showRecord?rec
> ordid=5 to
> access this page, all they see is the *final* URL which is 
> the JSP page that
> the servlet (showRecord) forwarded to.

Nope.  Forwarding is a servlet-specification thing, not an HTTP thing.  So
the URL that the user had in his location at time (1) (see my previous post)
is the one that stays there.  The process of forwarding is designed to be
opaque to the end user--the servlet container actually could forward to 47
places and the user would never know the difference.

(Now, an HTTP 302 *redirect* on the other hand *would* change his URL, and
that's definitely not what you want.)

Cheers,
Laird

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message