aspose file tools*
The moose likes Servlets and the fly likes request origin Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "request origin" Watch "request origin" New topic
Author

request origin

Srividya Shiv
Ranch Hand

Joined: Jul 20, 2000
Posts: 31
Hi all
I want to know the page(html/jsp) from which a request has originated. Is there any method to get this.
thanks
vidya
Brian Nice
Ranch Hand

Joined: Nov 02, 2000
Posts: 195
Is this what you are looking for?
StringBuffer page = HttpUtils.getRequestURL(HttpServletRequest request);
If your request is forwarded to different pages, on the first page issue this method call, attach it to the request object and forward it along with all the other request information. Then you can retrieve it on your last page.
[This message has been edited by Brian Nice (edited December 06, 2000).]
Srividya Shiv
Ranch Hand

Joined: Jul 20, 2000
Posts: 31
Thanks Brian
I got it.
Originally posted by Brian Nice:
Is this what you are looking for?
StringBuffer page = HttpUtils.getRequestURL(HttpServletRequest request);
If your request is forwarded to different pages, on the first page issue this method call, attach it to the request object and forward it along with all the other request information. Then you can retrieve it on your last page.
[This message has been edited by Brian Nice (edited December 06, 2000).]

Kamakshi Mahadevan
Greenhorn

Joined: Nov 08, 2000
Posts: 18
Ihave a similar problem. My browser always shows only servlet names. It does not display intermediate jsp or html page names.
Is there a way of displaying the URL of the exact page that's currently executing everytime??
Kamakshi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: request origin
 
Similar Threads
The Java Class Libraries, Volume 1
Interceptors
WA #1.....word association
Request input stream
Question ID :995549757220