Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URL "protected"

 
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
Saloon Keeper
Pie
Posts: 18152
52
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!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic