Acess JDOM from Servlet

E

Ekim

hy,

I'm using Tomcat for my Servlet, and within the servlet I use my self
programmed class, which shall access some JDOM-functions.

My problem is that the JDOM-classes are not found when I want to execute the
servlet.
I always get an error-message similar to this one:

...................
root cause

java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder
............The jdom.jar-file on the other hand is included in the classpath
correctly,because when I want to compile the file from the command
line,everything is okay!So where's my mistake?I hope you can help me,thanks
in advance,ekim!
 
W

Wendy S

Ekim said:
I'm using Tomcat for my Servlet, and within the servlet I use my self
programmed class, which shall access some JDOM-functions.
My problem is that the JDOM-classes are not found when I want to execute the
servlet.
I always get an error-message similar to this one:
java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder
...........The jdom.jar-file on the other hand is included in the classpath
correctly,because when I want to compile the file from the command
line,everything is okay!So where's my mistake?I hope you can help me,thanks
in advance,ekim!

Tomcat forms its own classpath for each servlet context. Place jdom.jar (or
whatever it's called) in /WEB-INF/lib for your context, and it will be found
at runtime.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top