This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JSP and the fly likes problem to call errorpage in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem to call errorpage in jsp" Watch "problem to call errorpage in jsp" New topic

problem to call errorpage in jsp

Arun Maalik
Ranch Hand

Joined: Oct 25, 2005
Posts: 216
[code for jsp]

<%@ page language="java"%>
<%@ page errorPage="errorpage.jsp"%>
String[] str={"Arun","Kumar","maalik"};
String str1=request.getParameter("script");
int n=Integer.parseInt(str1.trim());

[code for errorpage]

<%@ page isErrorPage="true"%>


[code gor user input]
<body bgcolor=#87FFFF>
<form name="f1" action="test1.jsp">
<td>Enter script number</td>
<td><input type=text name="script"></td>

<td><input type=submit value="OK"</td>

Dear sir i have deployee all above three file within same context root. I am using the sun microsystem deployment tool.
As swon by code when i am sending array subscript 4 or 5 (any number except 0,1,2) it is not calling errorpage, can you tell me what wrong with my code. when i am sending number within array limit it is working fine. But when i am sending number out of limit browser showing error mesage as follow

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.


Please try the following:

Open the localhost:8080 home page, and then look for links to the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.

HTTP 500 - Internal server error
Internet Explorer

what wrong with me sir? would you please tell me?

with regard

Arun kumar maalik
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

MSIE, by default, does not show you the error screen generated by the server.
It sees the 500 response code and shows you it's own page.

To disable this, go to Tools -> Options -> Advanced (tab), and uncheck the "Show Friendly HTTP Errors" checkbox. You might need to restart MSIE or Windows to get this to take.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Arun Maalik
Ranch Hand

Joined: Oct 25, 2005
Posts: 216
Thanks sir thank a you told me i did same work and it is working now.

Arun kumar maalik
I agree. Here's the link:
subject: problem to call errorpage in jsp
It's not a secret anymore!