美文网首页
传统 Servlet 应用

传统 Servlet 应用

作者: pure_joy | 来源:发表于2018-12-28 15:46 被阅读7次

Servlet 组件:Servlet、Filter、Listener

  • Servlet
    实现:@WebServlet
    URL 映射:@WebServlet(urlPatterns = "/my/servlet")
    注册:@ServletComponentScan(basePackages = “com.purejoy.test.servlet”)

Servlet 注册:Servlet注解、Spring Bean、RegistrationBean

  • Spring Bean
    @Bean
  • RegistrationBean
    ServletRegistrationBean
    FilterRegistrationBean
    ServletListenerRegistrationBean

异步非阻塞:异步 Servlet、非阻塞 Servlet

  • 异步 Servlet
    javax.servlet.ServletRequest#startAsync()
    javax.servlet.AsyncContext
  • 非阻塞 Servlet
    javax.servlet.ServletInputStream#setReadListener
    javax.servlet.ReadListener
    javax.servlet.ServletOutputStream#setWriteListener
    javax.servlet.WriteListener

相关文章

网友评论

      本文标题:传统 Servlet 应用

      本文链接:https://www.haomeiwen.com/subject/sqoslqtx.html