• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ServletExeption problem?

 
Suka Hati
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using tomcat on linux machine

when i run my page, i got thies error
javax.servlet.ServletException: Error instantiating servlet class Try5
my directory is :

webapps/try/demo.jsp
webapps/try/WEB-INF/web.xml
webapps/try/WEB-INF/classes/Try5.cla�ss

My WEB.XML file is:
------------------------------�------------------------------�-------
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
<servlet>
<servlet-name>Try5</servlet-name>
<servlet-class>Try5</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Try5</servlet-name>
<url-pattern>/Try5/*</url-pattern>
</servlet-mapping>
</web-app>

it seems like it doesnt found my servlet.
how to solve this error
 
Suka Hati
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
error(continue)

root cause

java.lang.NoClassDefFoundError
 
Jeffrey Spaulding
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the url you use?
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Suka Hati:
root cause

java.lang.NoClassDefFoundError


Where is the stack trace??
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have a servlet called Try5?
Where are you keeping the class file?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic