RestEasy and Struts 2 - Interceptor problem

0

My project uses Wildfly 8, Java 8 with Struts 2. I am trying to use RestEasy to implement Web services. The project works perfectly, but when I include the settings for RestEasy in web.xml, the Struts 2 interceptor stops working. The RestEasy settings are at the end of the web.xml below:

        <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" 
        xmlns="http://java.sun.com/xml/ns/javaee" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

        <display-name>Sistema Academico</display-name>

        <filter>
            <filter-name>ResponseOverrideFilter</filter-name>     
            <filter-class>org.displaytag.filter.ResponseOverrideFilter</filter-class>
        </filter>

        <filter>
            <filter-name>struts-cleanup</filter-name>
            <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
        </filter>

        <filter>
            <filter-name>struts</filter-name>
            <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
        </filter>

        <filter-mapping>
            <filter-name>ResponseOverrideFilter</filter-name>
            <url-pattern>*.action</url-pattern>
        </filter-mapping>

        <filter-mapping>
            <filter-name>ResponseOverrideFilter</filter-name>
            <url-pattern>*.jsp</url-pattern>
        </filter-mapping>   

        <filter-mapping>
            <filter-name>struts-cleanup</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>

        <filter-mapping>
            <filter-name>struts</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>

        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>

        <listener>
            <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
        </listener>

        <listener>
            <listener-class>br.com.common.utils.SessionListener</listener-class>
        </listener>

        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/applicationContext.xml</param-value>
        </context-param>


        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
            <welcome-file>default.jsp</welcome-file>
            <welcome-file>index.html</welcome-file>
        </welcome-file-list>

        <session-config>
          <session-timeout>20</session-timeout> 
        </session-config>

   <!-- RESTEasy: mapeie "TODOS" meus recursos JAX-RS -->  
   <context-param>  
      <param-name>resteasy.scan</param-name>  
      <param-value>true</param-value>  
   </context-param>  

   <!-- O Servlet do RESTeasy pega as requests para direcionar para as suas   
      classes JAX-RS -->  
   <servlet>  
      <servlet-name>Resteasy</servlet-name>  
      <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>  
   </servlet>  

   <!-- O servlet do RESTEasy responde na raiz da aplicação -->  
   <servlet-mapping>  
      <servlet-name>Resteasy</servlet-name>  
      <url-pattern>/*</url-pattern>  
   </servlet-mapping>  

    </web-app>

Is it possible to use RestEasy with Struts2? Can anyone point to where I'm wrong?

Thank you

    
asked by anonymous 24.06.2016 / 17:16

0 answers