Hi, Is it possible for a servlet to get the name of the html page that called it? - even if the html page is on a different box? We have a situation where one servlet is used for database input by many html pages and it would be nice if the servlet could return the user to the same page where they started. Many thanks
George Pavamani
Ranch Hand
Joined: Jan 31, 2002
Posts: 31
posted
0
If i were you, I would either go for URL Rewriting or Hidden fields(if the html pages are form). Attach a value to the URL ( or hidden field) that would help in uniquely identifying the html page. I hope this helps.
George Carlson
Greenhorn
Joined: Aug 24, 2000
Posts: 15
posted
0
A much simpler way to get the name of the html page that called the servlet is to use the request.getHeader("referrer") method. This will work unless you are calling it from an https page in which it is a lot harder.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: servlet redirect to html page that called it