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 456,562 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,507 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: 955 | Replies: 3
Reply
Join Date: Oct 2007
Posts: 2
Reputation: anandv1986 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
anandv1986 anandv1986 is offline Offline
Newbie Poster

Question while running jsp it is showing error

  #1  
Oct 21st, 2007
Dear Folks,

This is anand, i m new to Tomcat5.5, i have given my directory structure i think nothing wrong with this but it is showing some error.
Webapps
I
anand
I
WEB-INF, helloworld.jsp
I
classes,web.xml

If i try to run my simple helloworld jsp program it is showing error like this

HTTP Status 500 -


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

type Exception report

message

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

exception

javax.servlet.ServletException: Wrapper cannot find servlet class anand-jsp or a class it depends on
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Unknown Source)

root cause

java.lang.ClassNotFoundException: anand-jsp
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1362)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Unknown Source)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2006
Posts: 162
Reputation: Cerberus is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 14
Cerberus Cerberus is offline Offline
Junior Poster

Re: while running jsp it is showing error

  #2  
Oct 21st, 2007
Perhaps there is an issue with your web.xml file.

How are you outputting your Hello World program? E.g. using a class or sciptlet in the JSP page.
Reply With Quote  
Join Date: Oct 2007
Posts: 2
Reputation: anandv1986 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
anandv1986 anandv1986 is offline Offline
Newbie Poster

Question Re: while running jsp it is showing error

  #3  
Oct 22nd, 2007
Originally Posted by Cerberus View Post
Perhaps there is an issue with your web.xml file.

How are you outputting your Hello World program? E.g. using a class or sciptlet in the JSP page.



My JSP file contains only this code,

<head>
<title> My First JSP</title>
<body>
<%@page import="java.util.*"%>
welcome to JSP
The Current Date <%= new Date()%>
</body>
</html>
Reply With Quote  
Join Date: Sep 2006
Posts: 162
Reputation: Cerberus is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 14
Cerberus Cerberus is offline Offline
Junior Poster

Re: while running jsp it is showing error

  #4  
Oct 22nd, 2007
It works fine for me. I think that it does't like the import statement (can't find the class).

See if the following works.

<html>
<body>
<%
      out.print("Hello World");
%>
</body>
</html>

I'm new to JSP too so if any experts can help feel free.
Reply With Quote  
Reply

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

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

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

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