my dog learned polymorphism*
The moose likes Servlets and the fly likes Where to put the servlet.jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Where to put the servlet.jar" Watch "Where to put the servlet.jar" New topic
Author

Where to put the servlet.jar

Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
Hi, I just found a servlet.jar in tomcat's lib directory. I put it in C:\jdk1.2.1\lib, the compiler can not find javax.servlet.*. Then I put it in C:\jdk1.2.1\jre\lib, the compiler still can't find javax.servlet.*. Can someone tell me where exactly to place the servlet.jar?
Thanks.
BTW, I am using JDK 1.2.1.
Bipul Bhatta
Greenhorn

Joined: Apr 07, 2001
Posts: 1
Hi,
As u find the servlet.jar in the tomcat's directory, note down the full path.Then go to the dos prompt and set classpath ,the command may be set classpath=%classpath%;c:dir name\dir name\(where servlet.jar file is).

Then complie servlet file and run it.Think now it will work .
Byee
Bipul
Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
At c:/> I put classpath=%classpath%;C:\jakarta-tomcat-3.2.1\lib, but DOS says "Bad command or file name". Can you be more specific?
Thanks.
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Hi Cameron,
If JAR file has to be recognized in the classpath, you need to provide the complete path including the name of the JAR file
Assuming, that you have have servlet.jar in C:\jakarta-tomcat-3.2.1\lib, this is what you need to add in your System/User Classpath of your system

Alternatively, you could type the following command in the DOS-Prompt

Hope this helps,
Regards,


------------------
Sandeep Desai
vgdesai@vsnl.com

  1. Sun Certified Java Programmer Scored 93 per cent
  2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
  4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56


<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
 
Don't get me started about those stupid light bulbs.
 
subject: Where to put the servlet.jar