Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to give classpath while executing servlets

 
pavan Kumar
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Apache Tomcat Server in c:\programfiles
i'm saving my servlet programs in c:\programfiles\Apache Tomcat 4.0\webapps\root\web-inf\classes\xxxx.java.
while compiling i have set the classpath to c:\programfiles\Apache Tomcat 4.0\common\lib\servlet.jar
.....
But,
It is showing some errors .... plz help me ...
My operating System is : Windows 98
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

It is showing some errors

What are the errors? Without you telling us we can only guess...
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

while compiling i have set the classpath to c:\programfiles\Apache Tomcat 4.0\common\lib\servlet.jar
.....

If the error is that the system is unable to find the classes in servlet.jar, it may be due to the space between Apache Tomcat and 4.0 if that's how it actually is. You could try changing the dir name to
ApacheTomcat4.0 instead of Apache Tomcat 4.0.
Ofcourse as the post above says, psl always give as much details as possible for us to help u, otherwise we can only make guesses, like how I have done here :-)

ram.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pavan,

Your display name is invalid, and accounts with invalid display names get deleted.

Please see the note from Marilyn here.

We require display names to be two words: your first name, a space, then your last name. Fictitious names are not allowed.

thanks,
Dave.
 
James Carman
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Tomcat, you can figure out a LOT about the classpath by printing out the ClassLoader...

System.out.println( Thread.currentThread().getContextClassLoader() );

Their WebappClassLoader class (I think that's what it's called) overrides toString() and prints out a wealth of information. Hope that helps!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic