aspose file tools*
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
Author

Actionforward url

Shafeeque Evan
Greenhorn

Joined: Mar 11, 2009
Posts: 2
Hi,
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 http://1.2.3.4/logon.jsp 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?

Thanks,
Shafeeq
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

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


SCJP, SCWCD.
|Asking Good Questions|
Shafeeque Evan
Greenhorn

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: http://aspose.com/file-tools
 
subject: Actionforward url