• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

ServletExeption problem?

 
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
 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the url you use?
 
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??
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • 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?
 
I'm all tasted up for a BLT! This tiny ad wants a monte cristo!
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!