Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

URL "protected"  RSS feed

 
Ricardo Gil
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my url is http://test.jsp?cod=3
it's ok!
but if anybody change it to test.jsp?sdjhsds, then return a error!
how i can "protect" it, returning my default error: "parameters incorrects"
tnks/////
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

and provide an error page. That's one way to do it. The key here is that if the parameter wasn't sent, it will always be null.
 
Ricardo Gil
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok man!!!
it's work,,, and at top of my jsp i put
<%@ page errorPage="index.jsp" %>
and when error occurs it redirect to index page!!!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!