This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes referer question. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "referer question." Watch "referer question." New topic

referer question.

Rob Deer

Joined: Jan 10, 2005
Posts: 17
I got a html form in /form.jsp which calls a servlet, /validate, to validate form information. if validation doesn't pass, it gets redirected back to form.jsp with error message. to differentiate different types of messages, i pass params to forms.jsp like form.jsp?error=1. However, I don't want to allow people seeing the error message unless it comes from the servlet /validate. I tried using getHeader("referer"), but it seems to get the form.jsp header rather than the /validate servlet. any way around this? Thanks.
moh sak
Ranch Hand

Joined: May 11, 2005
Posts: 78
why don't you set a request parameter in ur servlet and send it back to ur jsp page and in there fetch the message using
[ October 17, 2005: Message edited by: moh sak ]
Have you checked out Aspose?
subject: referer question.
It's not a secret anymore!