RSS Forums RSS
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1306 | Replies: 7
Reply
Join Date: Mar 2008
Posts: 6
Reputation: deepakraj is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
deepakraj deepakraj is offline Offline
Newbie Poster

jsp run at Linux Tomcat server

  #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)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2008
Posts: 6
Reputation: deepakraj is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
deepakraj deepakraj is offline Offline
Newbie Poster

Exception in jsp

  #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  
Join Date: Feb 2006
Posts: 1,565
Reputation: masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light 
Rep Power: 11
Solved Threads: 144
masijade's Avatar
masijade masijade is offline Offline
Posting Virtuoso

Re: Exception in jsp

  #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  
Join Date: Mar 2008
Posts: 6
Reputation: deepakraj is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
deepakraj deepakraj is offline Offline
Newbie Poster

Re: Exception in jsp

  #4  
Apr 24th, 2008
is this the problem of connection ?
Reply With Quote  
Join Date: Feb 2006
Posts: 1,565
Reputation: masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light 
Rep Power: 11
Solved Threads: 144
masijade's Avatar
masijade masijade is offline Offline
Posting Virtuoso

Re: Exception in jsp

  #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  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,749
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 19
Solved Threads: 200
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: jsp run at Linux Tomcat server

  #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  
Join Date: Mar 2008
Posts: 6
Reputation: deepakraj is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
deepakraj deepakraj is offline Offline
Newbie Poster

org.apache.jasper.JasperException: Exception in JSP

  #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  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,749
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 19
Solved Threads: 200
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

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

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:38 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC