What container do JAX-RS web services work in?

To my knowledge, Java EE application servers have basically two types of containers. Namely the web container and the EJB container.

I managed to run a JAX-RS application that used Jersey as its implementation on Tomcat. As I know, Tomcat is just a web container. To run the web service on tomcat, t-shirt banks had to be embedded in the war file because Tomcat had no jersey cans out of the box. This raised a question for me.

Does tomcat use a different JAX-RS implementation other than Jersey? If so, what is it?

, if not,

I could not start the Jax-RS application without the cans included in the war file, which means that the JAX-RS applications need something more than the proposed web containers. This means that they do not start in the web container. then in which container does it run?

+4
source share
1 answer

"Does tomcat use a different JAX-RS implementation other than Jersey?"

I don’t know if you are asking if Tomcat has an implementation or whether it can execute other implementations next to Jersey.

The answer to the first is no. Vanilla Tomcat does not support JAX-RS out of the box. This is not an EE server, but just a Servlet container. But TomEE + (built on Tomcat) has support (using CXF).

- .

" Jax-RS , "

, . JAX-RS.

" , -, ?"

Servlet. JAX-RS . ServletContainer. Tomcat Servlet , . . (. )


Java EE, EE, Glassfish ( ), JBoss/Wildfly ( Resteasy), TomEE +, ( CXF )


, :

+5

All Articles