• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet.jar and servlet-api.jar

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65342
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Julian is correct.
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65342
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic