Home Jsp JSP Error 500
Questions:Ask|Latest

 
 

Share on Google+Share on Google+

JSP Error 500

Advertisement
JSP Error 500 is to generate error status 500 in jsp.

JSP Error 500

        

JSP Error 500 is to generate error status 500 in jsp.  The Error 500 occurred when the server encounter an internal error that prevent it from fulfilling the request.

Understand with Example

In this section, you will learn how to generate error status 500 in jsp. You can see in the given example that we create a scriptlet that include sendError() method of the interface HttpServletResponse which sends an error response to the client using the specified status code and descriptive message. You can either use response.SC_INTERNAL_SERVER_ERROR in place of status code 500.

 

 

Here is the code of error500.jsp

<html>
<head>
<title>Generate Error</title>
</head>
<%
response.sendError(500, "Generate Error");
%>
</html>

Output will be displayed as:

Download Source Code:

 

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: June 16, 2009

Related Tutorials

Ask Questions?    Discuss: JSP Error 500  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
bhasker pratap singh
July 9, 2011
http error 500

how can we solve the http error 500??
DMCA.com