Deploying a Jersey webapp on Jboss AS 7

后端 未结 11 1181
既然无缘
既然无缘 2020-12-01 06:13

Currently running some webapps on Jboss AS 4/5 and I am testing migration to jboss7. When I try to deploy a jersey based webapp on JBoss AS 7 (full profile with standalone-p

11条回答
  •  情书的邮戳
    2020-12-01 07:03

    I believe the correct approach is to use app server agnostic JAX-RS application deployment. No need to mess with any JBoss configuration. All you need is, extend javax.ws.rs.core.Application in your JAX-RS web application. You can find an example here. Then, you need to put this in your web.xml.

    
      Jersey Web Application
      com.sun.jersey.spi.container.servlet.ServletContainer
      
        javax.ws.rs.Application
        jersey.MyApplication
      
      
        resteasy.scan
        false
      
      
        resteasy.scan.providers
        false
      
      
        resteasy.scan.resources
        false
      
    
      1
    
    

    Package scanning mechanism does not work correctly on JBoss 7.x. I have tested this approach successfully in JBoss 7.0.2.Final and JBoss 7.1.1.Final.

提交回复
热议问题