aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "referer question." Watch "referer question." New topic
Author

referer question.

Rob Deer
Greenhorn

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
hi,
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: referer question.
 
Similar Threads
I need help with this situation regarding form post parameters
action forward problem : when "Failure"
'POST'ing parameters to another JSP
How to remember HTML Form fields with Servlets
Constructor Problem