Spring servlet Extension Undertow

Source: Internet
Author: User

Official address: http://undertow.io/documentation/servlet/servlet-extensions.html to study, mark.

Source Address: Https://github.com/undertow-io/undertow/tree/c3b8a88db6999c231b4def84437d8c32cf1e2efe

servlet extensionsservlet extensions allow you to hooks into the Servlet deployment process, and modify aspect of a Ser Vlet deployment. In some ways they is similar to Servletcontainerinitializer or Servletcontextlistener, however they provides much more FL Exibility over, can be modified. In order to create a servletextension it was necessary to implement Io.undertow.servlet.ServletExtension, and then add the Name of your implementationclassTo Meta-inf/services/io.undertow.servlet.servletextension. When Undertow is deploying a Servlet deployment it would load all such services from the deploymentsclassloader, and then invoke their Handledeployment method. This method was passed an undertow deploymentinfo structure, which contains a complete and mutable description of the Deplo Yment, my modifying ThisStructure it is possible to change any aspect of the deployment. The DEPLOYMENTINFO structure is the same structure that's used by the embedded API so-in effect a servletextension have t He same amount of flexibility that you had when using the undertow in embedded mode. There is many possible use cases for  This, a common one would is to add additional authentication mechanisms to a deployment, or to usenativeUndertow handlers as part of a Servlet deployment.

Spring servlet Extension Undertow

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.