This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes servlet.jar and servlet-api.jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet.jar and servlet-api.jar" Watch "servlet.jar and servlet-api.jar" New topic
Author

servlet.jar and servlet-api.jar

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
When I used the Tomcat 4.1.18, I copied the servlet.jar file from C:\jakarta-tomcat-LE-4.1.18\common\lib to the C:\j2sdk1.4.2\lib directory.

However, I do not find servlet.jar file in the Tomcat 5.0.27. I only find servlet-api.jar in the jakarta-tomcat-5.0.27\common\lib directory. Are servlet-api.jar (5.0.27 version) and servlet.jar (4.1.18 version) the same thing?
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Effectively, yes. You need to use servlet.jar for Tomcat 4 and servlet-api.jar for Tomcat 5. I think 4 supports the Servlet 2.3 spec and 5 supports Servlet 2.4. I'm sure someone with greater knowledge than I will correct me if I'm wrong.

Jules
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Julian is correct.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
What about the jsp-api.jar file? Do I also copy it from the C:\jakarta-tomcat-5.0.27\common\lib directory to the C:\j2sdk1.4.2\lib directory?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

To use JSP 2.0 you probably need the JSP jar as well. But why are you copying them around? You should just leave them where they are and be sure they are included in the compile classpath (using Ant makes this simple).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet.jar and servlet-api.jar
 
Similar Threads
Tomcat 5.0.27 Set Up Problem
HelloWorld Servlet compilation errors
problem compiling Servlets
struts with tomcat -not recognizing servlet.api.jar
Compiling my first custom tag handler