• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

referer question.

 
Rob Deer
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic