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
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.
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: servlet redirect to html page that called it