Avoid HTTP500 and redirect user in onother url (jsp page) -


i have url www.myurl.jsp?param=1
if change manually param=1 value e.g 12 browser gives error page
exception occurred processing jsp page /myurl.jsp

what can do, instead of giving message, redirect user url (that exists) thankss!!

after research find it.. edit web.xml file , put these elements spesific error

<error-page>   <error-code> 404 </error-code>   <location>/error_404.jsp<location> </error-page> 

and java exceptions

<error-page>   <error-code> java.lang.throwable </error-code>   <location>/error_java.jsp<location> </error-page> 

and in error_java.jsp put

<%@ page iserrorpage="true" %> 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -