You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Asad Habib <as...@gmail.com> on 2008/03/06 10:03:48 UTC
Determining the Current Page
Is there a way to use Struts tags only to determine which page a user
is currently on? I know this can be done using the JSP request object
but I'd rather use Struts tags if possible. Thank you.
- Asad
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [struts] Determining the Current Page
Posted by Dale Newfield <Da...@Newfield.org>.
Asad Habib wrote:
> Is there a way to use Struts tags only to determine which page a user
> is currently on? I know this can be done using the JSP request object
> but I'd rather use Struts tags if possible. Thank you.
That question has no answer, since whenever server side code is running
the user isn't on any page, but is in between two pages.
If you mean "which page the user was on when they submitted this
request" that value should be in the "referer" http header (yes, it's
misspelled in the spec). If you mean the page for which the current
request is generating output, that's available from the request object
as well.
Note that if you mean the former, but are using a redirect-after-post
style, you may get the post address instead of the address from which
the post was posted.
Also note that if you've got any requests being submitted by javascript
rather than the user (ajax), all this goes out the window for those
requests.
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org