473,479 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

error page in jsp

20 New Member
I have two files - test.jsp and error.jsp
<<test.jsp>>
<%@ page errorPage="/error.jsp" %>
<%
int a[] = {3,2,1};
a[3]=100;
%>
<%= a[1] %>
<<error.jsp>>
<%@ page isErrorPage="true" import="java.io.*" %>
<html>
<head><title>Error Page.</title></head>
<body bgcolor="blue">
<font size="16" color="white">Your page generated an error:"<br/>
Exception:<br/>
<%= exception %></font>
</body>
</html>
when i send the request to page test.jsp then it gives HTTP 500 Internal Server Error.

I get error only if I first change a[3] to a[2] in file test.jsp and enter the url for test.jsp(this gives output on browser) and then I change back a[2] to a[3] and enter url for test.jsp in same browser.

So I want to know where is the problem exactly.
Feb 23 '09 #1
2 2134
chaarmann
785 Recognized Expert Contributor
Maybe your error page isn't in path "/" ?
Just put full path for "<%@ page errorPage="/error.jsp" %>"

Maybe you have an error in the error page itself?
I can see "<%= exception %>", but object/string exception isn't defined.

By the way, if you put "a[3]=100;", then you are causing an error, because the index only goes from 0 to 2.
(Your array holds 3 elements, the first at a[0], the second at a[1], the third and last at a[2])
Feb 23 '09 #2
devgupta01
20 New Member
Yes I get error "ArrayIndexOutOfBound:3" only if I first change a[3] to a[2] in file test.jsp and enter the url for test.jsp(this gives output on browser) and then I change back a[2] to a[3] and enter url for test.jsp in same browser.

Thanks for ur reply...chaarmann
Feb 23 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
3037
by: Paul | last post by:
I thought this is more of an IE issue but i've had no joy on that group perhaps somebody here will have a clue. If i click a link to a web page embedded in Excel (97 OR 2000) i get the standard...
9
13879
by: Nick | last post by:
the customError feature is not working. I have it setup as the help says in my web.config file. <customErrors defaultRedirect="DsAppError.aspx" mode="RemoteOnly"/> I tried in a couple...
6
3552
by: John Lau | last post by:
Hi, I am looking at the MS KB Article 306355: HOW TO: Create Custom Error Reporting Pages in ASP.NET by Using Visual C# .NET This article describes how to redirect errors to a custom html...
25
17142
by: moondaddy | last post by:
I have an application where users need to upload images and in my web.config file I have a setting like this: <httpRuntime maxRequestLength="512" /> Which restricts image larger than 500k from...
6
3858
by: ST | last post by:
Hi, I keep getting the parser error, and I have no idea why. I've tried a number of things including: 1)building/rebuilding about 100x 2)making sure all dll's are in the bin folder in the root...
6
2290
by: dee | last post by:
Hi In web.config I have to the following: <configuration> <system.web> <customErrors defaultRedirect="error.htm" mode="On" /> </system.web> </configuration>
2
2125
by: tshad | last post by:
This has been driving me crazy. I have been trying to get the error handling working on my system and can get parts of it working and others won't work at all. I found that you can't access...
7
5038
by: DC | last post by:
Hi, there is a 500;13 page one can configure in the website properties, but ..Net Framework 1.1 also delivers the "server too busy" message sometimes and the IIS custom error page does not seem...
25
4347
by: Blasting Cap | last post by:
I keep getting errors that pop up when I am trying to convert an application from dotnet framework 1.1 to framework 2.0. The old project was saved in sourcesafe from Visual Studio 2003, and I have...
1
1758
by: sean_walsh | last post by:
Hi From classic ASP, I had a custom error handling situation that was quite simple. Errors were all redirected to Error.asp. This page would check 2 settings, EmailErrorMessage and...
0
7027
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6899
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7019
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
6847
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4757
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4463
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2980
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2970
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
555
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.