views:

224

answers:

1

I've got a WAR that i need to deploy with TomCat, but i'm not sure which version of the servlet spec the WAR file uses.

According to apache's site (http://tomcat.apache.org/whichversion.html) i need to download a different version according to which spec the WAR file uses.

Is there any way to tell by unzipping the WAR file and looking at some config file?

+2  A: 

Try looking at the DTD/Schema of the web.xml file in the WEB-INF dir.

Note, servlet containers are backward compatible, so 2.3 servlet application should run just fine under a 2.4 servlet engine.

Shimi Bandiel
It says: <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">Does this mean it uses the servlet spec 2.3 and will only work with 3 versions old of tomcat?
Chris
I means that it uses the 2.3 spec and will work with tomcat 4.x and above!!
Shimi Bandiel
Thanks. And your 'and above' is great news too, i'd much prefer the latest tomcat.
Chris