Two Laptop Bag
The moose likes Tomcat and the fly likes Please Help me Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Please Help me" Watch "Please Help me" New topic

Please Help me

david hongw wang

Joined: Mar 28, 2006
Posts: 6
when I am trying to compile a servlet:
package javax.servlet does not exist
I have set ClassPath:
I can find these jars in my computer:

servlet-api.jar (96kb) in

j2ee.jar in

tools.jar in

I really don't konw what's wrong! I have searched 2 days and tried 2 days, need help! thank you very much!
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

The classpath must contain the JARs themselves, not the directories in which the JARs are found.

[Jess in Action][AskingGoodQuestions]
david hongw wang

Joined: Mar 28, 2006
Posts: 6
sorry, I didn't understand yet. You mean I have to copy these jars to somewhere else?
Thank You Very Much for reply
david hongw wang

Joined: Mar 28, 2006
Posts: 6
Thank You Very Much! I got it:


not only E:\Tomcat\common\lib
marc weber

Joined: Aug 31, 2004
Posts: 11343

This appears to be resolved, but I'm moving this to the Tomcat forum for other users who might have the same set-up question (and as a subtle hint that this would be a good place to ask future Tomcat questions ).
[ March 28, 2006: Message edited by: marc weber ]

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
I'm going to add my 2 cents worth. I know there is a learning curve, but it is reallly worth it to learn how to use ANT to compile etc. Tomcat projects. It frees you from messing around with the system environment CLASSPATH variable - that alone is worth the trouble.
Furthermore, all open source tools that work with Tomcat - such as AXIS - provide ANT build files to carry out common tasks.
I agree. Here's the link:
subject: Please Help me
It's not a secret anymore!