struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Friedman" <hum...@ix.netcom.com>
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
configuration.

Regards,
David

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

What?

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/input.do" in browser.  (Mapped
to InputAction)
2. InputAction's request.getRequestURL() is
"http://localhost/appname/input.do"
3. InputAction forward to OtherAction.
4. The OtherAction's request.getRequestURL() is
"http://localhost/appname/other.do". <-- THIS ISN'T WHAT I WANT.

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


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


Mime
View raw message