struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Friedman" <>
Subject RE: How do I get the original RequestURI?
Date Sun, 10 Sep 2006 15:22:13 GMT
I can't remember the last time I tried it but it sounds like
mapping.getPath() might be more along the lines of what you ask.  Why?
Because the mapping is more likely to be updated for your second action, the
OtherAction.   Since I can't remember the output of that method, you might
have to add the .do or something to "massage" the answer to match your


-----Original Message-----
From: David Grundberg []
Sent: Sunday, September 10, 2006 11:12 AM
To: Struts Users Mailing List
Subject: Re: How do I get the original RequestURI?


I'm sorry, but I'm not asking about how to assemble an URL.

I want to retrieve the original URL sent by the browser in the request.
The request.getRequestURL() is wrapped and modified with each forward,
and I want the first, by the browser, requested URL.

Since so many seem to misunderstand me:
1. User inputs "http://localhost/appname/" in browser.  (Mapped
to InputAction)
2. InputAction's request.getRequestURL() is
3. InputAction forward to OtherAction.
4. The OtherAction's request.getRequestURL() is
"http://localhost/appname/". <-- THIS ISN'T WHAT I WANT.

I want to retrieve the URL "http://localhost/appname/" in the
OtherAction WITHOUT modifying InputAction. How do I do this?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message