Exception in jsp

Reply

Join Date: Mar 2008
Posts: 6
Reputation: deepakraj is an unknown quantity at this point 
Solved Threads: 0
deepakraj deepakraj is offline Offline
Newbie Poster

jsp run at Linux Tomcat server

 
0
  #1
Apr 24th, 2008
Please tell me how i can run jsp page in Linux Tomcate server...
i found the error -


org.apache.jasper.JasperException: /USERINFO.jsp
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:433)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:361)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

java.io.FileNotFoundException: /USERINFO.jsp
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:278)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 6
Reputation: deepakraj is an unknown quantity at this point 
Solved Threads: 0
deepakraj deepakraj is offline Offline
Newbie Poster

Exception in jsp

 
0
  #2
Apr 24th, 2008
i am trying to connect remote mysql database which is run on linux (o/s) tomcat server.
i found these exception -


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

exception

org.apache.jasper.JasperException: Exception in JSP: /UserData.jsp:35

32:
33: <%
34: String sql2="select * from 'USERINFO' ";
35: Statement pst2=connection.createStatement();
36: ResultSet rs2=pst2.executeQuery(sql2);
37:
38: if(rs2.next())


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

java.lang.NullPointerException
org.apache.jsp.UserData_jsp._jspService(UserData_jsp.java:80)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,356
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 252
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: Exception in jsp

 
0
  #3
Apr 24th, 2008
Don't use scriptlets in your JSP. Move this out into a Bean. If you still have a problem, post the Bean, and the JSP tags you use to access it, and we'll continue.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 6
Reputation: deepakraj is an unknown quantity at this point 
Solved Threads: 0
deepakraj deepakraj is offline Offline
Newbie Poster

Re: Exception in jsp

 
0
  #4
Apr 24th, 2008
is this the problem of connection ?
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,356
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 252
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: Exception in jsp

 
0
  #5
Apr 24th, 2008
No, your actual probelm is that connection is probably not defined. But that is beside the point. Scriptlets have no place in JSP's anymore. Youre still allowed to use them (mainly for backwards compatability), but you shouldn't be using them. It makes maintenance of the application a living hell.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: jsp run at Linux Tomcat server

 
0
  #6
Apr 24th, 2008
says it all, the file isn't there.
Place the correct file in the correct place and try again.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 6
Reputation: deepakraj is an unknown quantity at this point 
Solved Threads: 0
deepakraj deepakraj is offline Offline
Newbie Poster

org.apache.jasper.JasperException: Exception in JSP

 
0
  #7
Apr 24th, 2008
I found this exception
please solve this ...


org.apache.jasper.JasperException: Exception in JSP: /UserData.jsp:36

33:
34: <%
35: String sql2="SELECT * FROM USERINFO";
36: pst2=connection.createStatement();
37:
38: rs=pst2.executeQuery(sql2);
39:


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

java.lang.NullPointerException
org.apache.jsp.UserData_jsp._jspService(UserData_jsp.java:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: org.apache.jasper.JasperException: Exception in JSP

 
0
  #8
Apr 24th, 2008
Stop using Java code in JSP.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC