Spring Web Services Tomcat Compatibility

In this post we attempt to help you choose the appropriate version of Tomcat when using Spring Web Services.

As context, if you’ve developed a web service, using Spring Web Services, chances are you’ve blissfully been using the Maven Jetty Plugin in your project during the development phase. When you’re getting ready to deploy to Tomcat however, you may need to know what the Servlet/JSP Spec version supported by Spring Web Services is since this is how the Tomcat Which Version page guides users in their decision making process.

Here are steps that could be used to determine the relevant Servlet/JSP Spec version and hence Tomcat version:

  1. Run mvn dependency:tree
  2. Look for the org.springframework.ws:spring-ws-core line and then for the version number of its org.springframework:spring-webmvc line, in our case, we have 3.1.0.RELEASE as the version
  3. Now look at the dependencies of the version of spring-webmvc and in turn it’s org.apache.tomcat:tomcat-servlet-api dependency, in our case, we find that we find that we are depedant on tomcat-servlet-api version 7.0.8
  4. Finally, have a look at the MANIFEST of the above mentioned jar, and here you will find the relevant Servlet Spec, in our case we find: Specification-Title : Java API for Servlets, Specification-Version : 3.0
  5. Choose Tomcat 7 as advised.

 

org.apache.tomcat

One thought on “Spring Web Services Tomcat Compatibility

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s