Why doesn't Tomcat 7x require setting up the WSServletContextListener and WSServlet in web.xml to deploy the Jax-ws service?

I am deploying and testing a simple Jax-ws servicein Tomcat6xand Tomcat7xusing jaxws-ri-2.2.8, added to both server lib directories.
Tomcat6xrequires WSServletContextListenerand WSServletand is configured in web.xml, while Tomcat 7xweb services are deployed without WSServletContextListenerand configuration WSServlet.
What is the difference Tomcat7that makes the configuration web.xmloptional?

+4
source share
2 answers

Tomcat 7.x Servlet 3.0, com.sun.xml.ws.transport.http.servlet.WSServletContextListener . Java EE 6 : javax.servlet.ServletContainerInitializer

, / - , .

jaxws-rt.jar \META-INF\services javax.servlet.ServletContainerInitializer :

com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer

, .

. Servlets 3.0 ServletContainerInitializer.

+6

Tomcat 7 Servlet 3.0, -, Servlets Listeners.

+1

Source: https://habr.com/ru/post/1532138/


All Articles