You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eugen Paraschiv <ha...@gmail.com> on 2012/12/10 16:42:40 UTC

Tomcat 7 servlet library

Hi,
I have a quick question about the exact version of the servlet library
packaged with Tomcat 7, and maybe the overall servlet spec.
Tomcat comes with it's own, custom build jar, published here on Maven
central:
http://search.maven.org/#browse|555734385
Is there a separation between the implementation of the spec and the
contract? More to the point - is there a way Tomcat could use a standard
version of the servlet jar (for which it has it's own internal
implementation)?
Thanks.
Eugen.

-- 
Eugen Paraschiv
Senior Java Programmer, Optaros
Mobile: +40728896170
Blog: www.baeldung.com
Twitter: https://twitter.com/baeldung

Re: Tomcat 7 servlet library

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/12/10 Eugen Paraschiv <ha...@gmail.com>:
> Hi,
> I have a quick question about the exact version of the servlet library
> packaged with Tomcat 7, and maybe the overall servlet spec.
> Tomcat comes with it's own, custom build jar, published here on Maven
> central:
> http://search.maven.org/#browse|555734385
> Is there a separation between the implementation of the spec and the
> contract? More to the point - is there a way Tomcat could use a standard
> version of the servlet jar (for which it has it's own internal
> implementation)?


> is there a way Tomcat could use a standard version of the servlet jar

1. No.

See ch.15.2.1 of the Servlet 3.0 specification. The Sevlet API classes
are provided by the container (Tomcat). You are not allowed to provide
a different implementation of them in your web application.

(If you attempt to bundle a different version of Servlet API classes,
the relevant JAR will be ignored and a warning will be logged).

2. The current versions of Tomcat 7 implement Servlet Specification 3.0 Rev. a.
(JSR 315 Maintenance Release, 06 Feb, 2011)

3. Official Tomcat downloads are at http://tomcat.apache.org/
The jars at Maven are just a convenience.

Tomcat source code includes classes in several javax.* packages. The
jar in question is built from those.

Best regards,
Konstantin Kolinko

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


Re: Tomcat 7 servlet library

Posted by Mark Thomas <ma...@apache.org>.
On 10/12/2012 15:42, Eugen Paraschiv wrote:
> Hi,
> I have a quick question about the exact version of the servlet library
> packaged with Tomcat 7, and maybe the overall servlet spec.
> Tomcat comes with it's own, custom build jar, published here on Maven
> central:
> http://search.maven.org/#browse|555734385
> Is there a separation between the implementation of the spec and the
> contract?

Yes. That JAR is the specification. The implementation is in (some of)
the other JARs.

> More to the point - is there a way Tomcat could use a standard
> version of the servlet jar (for which it has it's own internal
> implementation)?

In theory, you could replace servlet-api.jar with any other Servlet 3.0
JAR that passed the TCK. The question is why would you want to?

Mark


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