File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Actionforward url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Actionforward url" Watch "Actionforward url" New topic

Actionforward url

Shafeeque Evan

Joined: Mar 11, 2009
Posts: 2
A small doubt regarding the ActionForward.

From my Action class, when I return an ActionForward actually how is it constructing the url? what is happening inside?

In my application for reports we have to forward the action to a specific url(which is also a part of the same application) and we are creating a ActionForward with a relative url.
My problem is that ActionForward always creating the final url with http://hostname.
ie; Even if the user access our application by IP address, Action Forward url will convert it into hostname, and so we will not get the correct session.

For example, if the user starts like later after Actionforward
it is changing to http://hostname/....

How does Struts get the hostname information? How can we avoid it?
If the user start with IP, Actionforward should take the IP.

Is there a way to work around this?

Amit Ghorpade

Joined: Jun 06, 2007
Posts: 2851

"Shafeeque EV " please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.

|Asking Good Questions|
Shafeeque Evan

Joined: Mar 11, 2009
Posts: 2
Why no help? no one experienced such a problem or is it a silly question?

expecting some help...
I agree. Here's the link:
subject: Actionforward url
It's not a secret anymore!