File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes ServletExeption problem? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "ServletExeption problem?" Watch "ServletExeption problem?" New topic
Author

ServletExeption problem?

Suka Hati
Ranch Hand

Joined: Oct 28, 2004
Posts: 56
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

Joined: Oct 28, 2004
Posts: 56
error(continue)

root cause

java.lang.NoClassDefFoundError
Jeffrey Spaulding
Ranch Hand

Joined: Jan 15, 2004
Posts: 149
What's the url you use?
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Suka Hati:
root cause

java.lang.NoClassDefFoundError


Where is the stack trace??
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Do you have a servlet called Try5?
Where are you keeping the class file?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ServletExeption problem?