This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Servlets and the fly likes where to download servlet-api-2.5.jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "where to download servlet-api-2.5.jar" Watch "where to download servlet-api-2.5.jar" New topic
Author

where to download servlet-api-2.5.jar

William Stafford
Ranch Hand

Joined: Dec 13, 2004
Posts: 109
We just moved from java 1.4 to java 6 an we are seeing deprecation warnings for methods in HttpServletResponse. In our 1.4 environment we compiled with servletapi-2.3.jar. I suppose we need to move to the latest servlet api.
Based on a web search it appears that servlet-api-2.5.jar is the latest but I can not find a download site.

Can someone point me to a source for this jar.

Thanks,
-=beeky
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61448
    
  67

What servlet container are you using? It should contain the implementation that it supports.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
William Stafford
Ranch Hand

Joined: Dec 13, 2004
Posts: 109
Bear,

Thanks for the pointer, the correct servlet-api.jar is in the Tomcat5.5 common/lib.

As long as we are on the subject of missing jar files do you know what and where the jar file containing javax.servlet.jsp.* might be? When I replaced servlet-api-2.3 with the one from Tomcat 5 my deprecation warnings went away only to be replaced by errors saying javax.servlet.jsp can not be found.

Thanks again for the prompt reply,
-=beeky
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

There is a blue table on the front page of Tomcat's site that shows the correlation between Tomcat version and the JSP/Servlet spec versions.

It shows that Tomcat 6 supports Servlet Spec 2.5.
Tomcat always ships with a servlet-api.jar file.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by William Stafford:
...
As long as we are on the subject of missing jar files do you know what and where the jar file containing javax.servlet.jsp.* might be? When I replaced servlet-api-2.3 with the one from Tomcat 5 my deprecation warnings went away only to be replaced by errors saying javax.servlet.jsp can not be found.
...


There is a jsp-api.jar file in the same directory as servlet-api.jar in Tomcat.
William Stafford
Ranch Hand

Joined: Dec 13, 2004
Posts: 109
Thanks Ben and Bear!

I'll describe what I needed to deal with my situation in case someone comes upon this thread via a search.

When I moved to Tomcat5 I needed to update the jars in my development lib directory. I originally created the new project from an old one that had used Tomcat1.4. The jar files from that project are now out of date.

The jars I needed were in the Tomcat common/lib directory. In addition to servlet-api.jar I also needed jsp-api.jar. Apparently the old servlet-api.jar also contained jsp-api.jar but the newer ones don't.

Thanks again for the quick response.

-=beeky
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61448
    
  67

Does your IDE not allow you to add the jar file to your project from their original location? I never copy jar files around unless I have to.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: where to download servlet-api-2.5.jar