File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes which page call ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "which page call ?" Watch "which page call ?" New topic
Author

which page call ?

shahidrasul shahid
Ranch Hand

Joined: Jan 28, 2008
Posts: 62
i use struts and i forward two requests to one single page. i want to know which page call this one?


what is pattern to know this things. please anyone help me.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'm afraid I don't understand what it is you're trying to do. Could you please explain in greater detail?


Merrill
Consultant, Sima Solutions
shahidrasul shahid
Ranch Hand

Joined: Jan 28, 2008
Posts: 62
two pages send request to two one page . i want to know which page send request?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
There's no way to know implicitly which page or process called the current page. If you need to know the caller, I'd suggest passing a parameter that identifies the caller. For example, the first page calls the URL: myServer/MyApp/MyPage.jsp?fromPage=page1.jsp while the second page calls the URL: myServer/MyApp/MyPage.jsp?fromPage=page2.jsp.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: which page call ?