473,395 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

exception

hi... i am jsut developing a web application where it just throws a exception
"org.apache.jasper.JasperException" with the root cause "java.lang.ArrayIndexOutOfBoundsException:"
can anyone plz giude me to overcome this error
Feb 5 '08 #1
9 1175
r035198x
13,262 8TB
hi... i am jsut developing a web application where it just throws a exception
"org.apache.jasper.JasperException" with the root cause "java.lang.ArrayIndexOutOfBoundsException:"
can anyone plz giude me to overcome this error
Does the stack trace contain also the java file that threw the exception and the line number?
Feb 5 '08 #2
Does the stack trace contain also the java file that threw the exception and the line number?
no... no such informations
Feb 5 '08 #3
r035198x
13,262 8TB
no... no such informations
Can you post the full stacktrace that you got then.
Feb 5 '08 #4
Can you post the full stacktrace that you got then.
Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: 2
org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:368)


root cause

java.lang.ArrayIndexOutOfBoundsException: 2
org.apache.jsp.wrtrans_jsp._jspService(wrtrans_jsp .java:70)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:368)
Feb 5 '08 #5
r035198x
13,262 8TB
So it did give you the files and the line numbers.
When is the exception thrown?
Have you made sure that all your JSPs have compiled without errors?
Feb 5 '08 #6
So it did give you the files and the line numbers.
When is the exception thrown?
Have you made sure that all your JSPs have compiled without errors?

ya... its compiled and found no errors....
<%try{
String temp[];
String temp1=request.getParameter("ordid");
temp=temp1.split("=");
FileReader re=new FileReader("D:/venki/project/a1/FIX/belongings/"+session.getAttribute("sessuname")+".txt");
BufferedReader in = new BufferedReader(re);
----> if(temp[3]=="S")
{

now i got new error..... the error is shown in tat line... but the ordid is a valid one and request is working fine
Feb 5 '08 #7
r035198x
13,262 8TB
ya... its compiled and found no errors....
<%try{
String temp[];
String temp1=request.getParameter("ordid");
temp=temp1.split("=");
FileReader re=new FileReader("D:/venki/project/a1/FIX/belongings/"+session.getAttribute("sessuname")+".txt");
BufferedReader in = new BufferedReader(re);
----> if(temp[3]=="S")
{

now i got new error..... the error is shown in tat line... but the ordid is a valid one and request is working fine
You should be testing to make sure that the array called temp does have a length of four for you to be able to access its fourth element (temp[3]). Also, use the equals method when comparing strings in java and not ==
Feb 5 '08 #8
You should be testing to make sure that the array called temp does have a length of four for you to be able to access its fourth element (temp[3]). Also, use the equals method when comparing strings in java and not ==
i have also tried wit equals..... the result is the same..... same exception...
the array length is 4....
Feb 5 '08 #9
r035198x
13,262 8TB
i have also tried wit equals..... the result is the same..... same exception...
the array length is 4....
I won't take your word for it (judging by how the discussion has been going so far).
Print out the array length using System.out.println,(print out its contents too).
One other important thing, you said above that you are getting a new error. What is the error message for this new error?
Feb 5 '08 #10

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

Similar topics

4
by: Nicolas Fleury | last post by:
Hi, I've made a small utility to re-raise an exception with the same stack as before with additional information in it. Since I want to keep the same exception type and that some types have very...
11
by: Master of C++ | last post by:
Hi, I am writing a simulation package in C++, and so far I've written about 8000 lines of code and have about 30 classes. I haven't used C++ exceptions so far (for various reasons). The only two...
44
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level...
3
by: JohnDeHope3 | last post by:
First let me say that I understand that Asp.Net wraps my exception in an HttpUnhandledException. I have found a lot of discussion about that on the web, which was informative, but not helpful. Let...
2
by: Darko Miletic | last post by:
Recently I wrote a dll in c++ and to simplify the distribution I decided to link with multithreaded static library (/MT or /MTd option). In debug everything works fine but in release I get this: ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.