tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Tomcat 5.5 JDK version compatibility
Date Thu, 08 Mar 2012 19:53:39 GMT
2012/3/8 David Wahler <dwahler@indeed.com>:
> Hi all, I have a question about a comment on this bug report:
>
> https://issues.apache.org/bugzilla/show_bug.cgi?id=52545
>
> Mark Thomas noted that:
>
> "The application can not be compiled using a 1.4 JDK (the minimum Java version
> required by Servlet 2.4) since it uses annotations. While applications may be
> compiled with a later Java version, they must be compilable with the minimum
> Java version."
>
> I just want to make sure I'm understanding this correctly. Does this
> mean that if a web application is deployed in Tomcat 5.5, it may not
> use any language features that were introduced in J2SE 5.0 or later
> (e.g. annotations and generics), even if those features are supported
> by the JRE? I looked through both the servlet 2.4 specification and
> Tomcat's documentation and couldn't find anywhere this was documented,
> but I may have missed something.
>

I would say that it is just useless exercise to mark application as
"2.4" but rely on newer features in it.


The issue of "servlet 2.4" compatibility is that you have some old
application that you want to run "as is" on newer Tomcat.

The "javax.annotation.Resource" class is part of annotations-api.jar
which is not present in Tomcat 5.5. So a person is not able to compile
your application if he uses correct Servlet Specification JARs.


Just open a text editor and edit your web.xml so that it specifies the
correct version.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message