1

I'm trying to install the Commons libraries fileupload and commons-IO.

I have CentOS6 installed and Tomcat version 7.

I managed to download and install the Apache-commons-io package without any problem.

However the apache-commons-fileupload package gave me the servlet_2_4 api dependency issue.

I wonder if installing the new tomcat7-servlet-3 api will cause the above libraries to malfunction since they need the 2.4 version? Or maybe installing the tomcat5 2.4 servlet api will not work with tomcat7?

Which of these two approaches would you recommend?

1 Answer 1

0

Taken from Oracle's Servlet development guide :

 Servlet API version 3.0 is fully backward compatible with versions 2.3, 2.4, 
 and 2.5, so all existing servlets should work without modification or 
 recompilation.

Furthermore, it's stated in the Apache Tomcat 7 documentation that Tomcat 7 specifically implements the Servlet API version 3:

 Apache Tomcat version 7.0 implements the Servlet 3.0 and JavaServer Pages 2.2 
 specifications from the Java Community Process...

Therefore, I'd recommend that you go with version 3 of the Servlet API.

2
  • Thank you for your reply! It's good to know. Sorry for the late accepting! Sep 28, 2012 at 7:29
  • No worries. I'm glad I could help!
    – p_strand
    Sep 28, 2012 at 13:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .