Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet Getting an exception

Have Programming Question? Ask it here!
 
 
 


harini
Getting an exception
0 Answer(s)      4 years and 2 months ago
Posted in : JSP-Servlet


Dear sir,while executing this code i am getting a following error ,i am sending my code also please help me sir...
//following is a code

int a = 0, b = 1, c = 2, d = 3, e = 4,f=0;
//int a, b, c, d, e, f;
EmployeeDataBaseDAO employeeDataBase = new EmployeeDataBaseDAO();
if (session.getAttribute("ArrayValue") != null) {
arlValue = (ArrayList) session.getAttribute("ArrayValue");
}
for (int i = 0; i < arlValue.size(); i++) {
//System.out.println("@@@@@@@ charecter value is "
// + arlValue.get(i));
if (i == 0) {
//a = Short.valueOf(arlValue.get(i));
String strValue = arlValue.get(i);
char charValue[]=strValue.toCharArray();
int str=Integer.parseInt(strValue);
a=str;
System.out.println("%%%%%%%Value of a is"+a);
System.out.println("%%%%%%%value of str is " +str);
} else if (i == 1) {
b = Integer.parseInt(arlValue.get(i));
System.out.println("%%%%%%%value of a is " + b);
} else if (i == 2) {
c = Integer.parseInt(arlValue.get(i));
System.out.println("%%%%%%%value of a is " + c);
} else if (i == 3) {
d = Integer.parseInt(arlValue.get(i));
System.out.println("%%%%%%%value of a is " + d);
} else if (i == 4) {
e = Integer.parseInt(arlValue.get(i));
System.out.println("%%%%%%%value of a is " + e);
} else {
f = Integer.parseInt(arlValue.get(i));
System.out.println("%%%%%%%value of a is " + f);
}
}


//following is an exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /jsp/newTestMES3.jsp at line 67

64: // + arlValue.get(i));
65: if (i == 0) {
66: //a = Short.valueOf(arlValue.get(i));
67: String strValue = arlValue.get(i);
68: char charValue[]=strValue.toCharArray();
69: int str=Integer.parseInt(strValue);
70: a=str;


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

java.lang.ClassCastException: java.lang.Character
org.apache.jsp.jsp.newTestMES3_jsp._jspService(newTestMES3_jsp.java:128)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Getting Exception
Getting Exception  How to get exception from commented code in java
Getting an exception - JSP-Servlet
Getting an exception  Dear Sir , While sending a mail am getting an following exception javax.mail.MessagingException: 554 mail server permanently rejected message (#5. 3.0)so how to over come from this please help
Advertisements
Getting an exception - JSP-Servlet
Getting an exception  thanks sir for u r reply ,but i already added that jar file sir even though i m getting an exception sir please help me sir ... thanks in advance..  Hi Friend, You can do one thing, replace
Getting an exception - JSP-Servlet
Getting an exception   sir i am Getting following exception when...(cellStoreVector); } } catch (Exception e) { e.printStackTrace... running it will throwing an exception please help me sir thanks
I am getting this exception
I am getting this exception   Exception in thread "main" org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java
Getting an exception - JSP-Servlet
Getting an exception  sir i m Getting an following exception while... sending message; nested exception is: java.io.FileNotFoundException...); }catch(Exception e){ System.out.println("Send Mail exception
Getting an exception - JSP-Servlet
Getting an exception  Dear sir,while executing this code i am getting... of a is " + f); } } //following is an exception org.apache.jasper.JasperException: An exception occurred processing JSP page /jsp/newTestMES3.jsp at line
Getting an exception - JSP-Servlet
Getting an exception  sir i changed to that ie InputStream myInput1... exception please help me sir if an changes tel me sir thanks in advance...); } cellVectorHolder.addElement(cellStoreVector); } } catch (Exception e
Getting an exception - JSP-Servlet
Getting an exception  sir i used u r code for sending a mass email by reading an excel sheet,but i am getting a following error so please help me if any changes in code . thanks in advance.. java.io.IOException: Invalid
Getting an exception - JSP-Servlet
Getting an exception  sir i used u r code for sending a mass email by reading an excel sheet,but i am getting a following error so please help me if any changes in code . thanks in advance.. java.io.IOException: Invalid
Getting exception in Assocation & Join. - Hibernate
Getting exception in Assocation & Join.  select product0_.id as id0...) exception setting property value with CGLIB (set hibernate.cglib.use_reflection... org.hibernate.PropertyAccessException: exception setting property value with CGLIB
Getting Null pointer Exception in the jsp page
Getting Null pointer Exception in the jsp page  I have developed this jsp page to store the data in database.While storing the value of check box in database I am getting null pointer exception in the following code
Getting Null pointer Exception in the jsp page
Getting Null pointer Exception in the jsp page  I have developed this jsp page to store the data in database.While storing the value of check box in database I am getting null pointer exception in the following code
Getting Null pointer Exception in the jsp page
Getting Null pointer Exception in the jsp page  I have developed this jsp page to store the data in database.While storing the value of check box in database I am getting null pointer exception in the following code
Getting Null pointer Exception in the jsp page
Getting Null pointer Exception in the jsp page  I have developed this jsp page to store the data in database.While storing the value of check box in database I am getting null pointer exception in the following code
getting classnotfound exception while running login application
getting classnotfound exception while running login application  hi, I am getting Error creating bean with name 'urlMapping' defined... [TypedStringValue: value [/login.html], target type [null]]; nested exception
Getting Exception on UseDefinedException sample program - Please help me how to resolve
Getting Exception on UseDefinedException sample program - Please help me how to resolve  class UseDefinedException extends Exception{ String msg...); } } } Hi, I tried above code but getting Exception : MyException cannot
try to execute this code getting class cast exception, please resolve it.
try to execute this code getting class cast exception, please resolve it.  package test; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; public class Over { static int k
using spring rmi+maven but i am getting this exception
using spring rmi+maven but i am getting this exception  D:\Nexustool... --- java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception
Exception
Exception  public class FooException extends Exception { public..."); } public void calculate() throws FooException, Exception { try { int.... ex.printStackTrace(); System.exit(1); } catch(Exception ex
exception
exception  wHEN RUNTIME EXCEPTION CLASS IS SUB OF EXCEPTION CLASS HOW CAN'T HANDLE UNCHECKED EXCEPTION
exception
exception  chek in and check out exception in java   Please visit the following link: Checked and Unchecked Exception
exception
arguments are not equalto two,throw a user defined exception "invalid parameter exception" ,otherwise display the two parameters.   Here is an example... is not equal to two then invalid parameter exception is thrown ,otherwise display the two
exception
exception  what is the use of catch block even though we have predefined exception object
exception
defined checked exception ââ?¬Å?InvalidCharcterFoundExceptionââ?¬Â? and creater a block of codes that will handle the exception
exception
exception  example for numberformat exception   Hi Friend, Try the following code: class NumberFormatExceptionEx{ public static void...); } catch(Exception e){ System.out.println(e
Exception
Exception  whis is the Arithmetic Exception in java? or define Arithmetic Exception with exp?   Arithmetic Exception occurs, when you divide a number by zero. Example public class TryCatch { public static void main
Exception
Exception   I was creating a table dynamically but it shows exception i.e shown down Suplier created0 Suplier created0 Suplier created0 Product created0 Product created0 Product created0 Product created0 could not fetch initial
exception
user defined unchecked exception  can we create user defined unchecked exceptions? if so what is the exact use of it in real time?   Please visit the following links: http://www.roseindia.net/java/java-exception/user
exception
exception  Identify the reason for SQLException exception, which is encountered when the developer tries to run the following code snippet to insert..."); ps.executeUpdate(); } catch(Exception e
Getting NumberFormatException
Getting NumberFormatException  Hello Sir, I'm using Integer.parseInt... also used Integer.parseInt(String str, int radix) but it also throws the exception... it in a JSP it continuously throws the exception. below is the code I used. Please
getting variables
getting variables   how to get variables from servlet program to webservice program
Getting an error :(
Getting an error :(  I implemented the same code as above.. But getting this error in console... Console Oct 5, 2012 10:18:14 AM... loadOnStartup SEVERE: Servlet /SpringMVC threw load() exception
getting the emplo
getting the emplo   I have one table "EMPLOYEEMASTER" contains 'emp id', 'employee name' for eg: emp id employee name... kumar i want the sql statement for getting like emp id
Getting NumberFormatException
Getting NumberFormatException  Thanks for the reply. Its works well, but whenever I'm using numeric value from 0010 to 0757 it is returning some garbage value. I dont have the idea what is going wrong. Please give me some idea
getting errors
getting errors  public class positive { public static void main(String[] args) { retainPositiveNumbers(a); } private static int n; private static int j; static int a[]={-1,2,3,4,-5}; static int
getting voucherPin
getting voucherPin  I am doin an online credit topup application..and i need a method to fetch and decrypt the voucherpin from Database.. this is my voucher repository Class. public interface VoucherRepository extends
Exception - Struts
Exception - java.lang.reflect.InvocationTargetException   java.lang.reflect.InvocationTargetException i am getting the foregoing error ...can anyone...: java.lang.reflect.InvocationTargetException: This is a checked exception that extends Exception Class thrown
exception - Struts
exception  Hi, While try to upload the example given by you in struts I am getting the exception javax.servlet.jsp.JspException: Cannot...: Exception in JSP: /FileUpload.jsp:10 7: 8: 9: 10: 11: 12: 13
Exception in thread
Exception in thread   Hi, I have created a java file for sending... but when i am trying to run following command I am getting an error. java -cp D:\mail.jar SendMailTLSDFC Exception in thread "main" java.lang.NoClassDefFoundError
problem getting password - JavaMail
problem getting password  hi i am trying to get password but igot following error Error sending mail:javax.mail.MessagingException: Could not connect to SMTP host: 192.168.10.14, port: 25;nested exception
exception handling
exception handling  explain about exception handling
Exception handling
Exception handling  how to resolve file not found error exception
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
Exception Java
Exception Java  Hi, What are the Exception Java? Thanks   Hi, Read it at Java Exception. Thanks
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
Advertisements
 

 

 

DMCA.com