• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems compiling servlets on Tomcat 5.00.28

 
Richard Olson
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to compile a simply servlet on Tomcat, but ran into a problem.

First, I believe you need to javac -classpath CATALINA_HOME/common/lib/servlet.jar ClassName.java Sounds simple, but where do I download servlet.jar? I went to the Sun site, downloaded j2eesdk-1_4_02_2005Q2-windows.exe, but no servlet.jar.

Thanks,
Rich
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
$CATALINE_HOME is where you installed Tomcat. The jar files are part of the Tomcat distribution.

Btw, on UNIX systems, don't forget the $. It translates the environment variable CATALINA_HOME to its definition. On Windows, I believe you need to surround it with %.
[ August 07, 2005: Message edited by: Bear Bibeault ]
 
Richard Olson
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actaully, servlet.jar did not come with my Tomcat versiuon which surprised me. Also, successfully compiled my code with j2ee.jar.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Richard Olson:
Actaully, servlet.jar did not come with my Tomcat versiuon which surprised me. Also, successfully compiled my code with j2ee.jar.


Which version of tomcat are you using? After tomcat 5.x it uses servlet-api.jar.

Is it there?
 
Richard Olson
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat 5.0.28. Yup, just realized they renamed the jar file. thanks for the help guys
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic