User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 363,448 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,269 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 687 | 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,319
Reputation: masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough 
Rep Power: 7
Solved Threads: 110
masijade's Avatar
masijade masijade is offline Offline
Nearly a 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,319
Reputation: masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough 
Rep Power: 7
Solved Threads: 110
masijade's Avatar
masijade masijade is offline Offline
Nearly a 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,583
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: 18
Solved Threads: 186
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.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
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,583
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: 18
Solved Threads: 186
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.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
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)

 

DaniWeb JSP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 2:28 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC