aspose file tools*
The moose likes Servlets and the fly likes Problems compiling servlets on Tomcat 5.00.28 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problems compiling servlets on Tomcat 5.00.28" Watch "Problems compiling servlets on Tomcat 5.00.28" New topic
Author

Problems compiling servlets on Tomcat 5.00.28

Richard Olson
Greenhorn

Joined: Mar 15, 2004
Posts: 15
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

Joined: Jan 10, 2002
Posts: 61218
    
  66

$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 ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Richard Olson
Greenhorn

Joined: Mar 15, 2004
Posts: 15
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

Joined: Aug 15, 2004
Posts: 2874
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

Joined: Mar 15, 2004
Posts: 15
Tomcat 5.0.28. Yup, just realized they renamed the jar file. thanks for the help guys
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems compiling servlets on Tomcat 5.00.28