Meteor chat with struts 2

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Meteor chat with struts 2

mukesh7333
Hi All,

When I dont use Struts filter in web.xml my Meteor chat application is running correctly
but when i use struts FilterDispature in web.xml it give an error because when meteor send get request, it goes through FilterDispature of struts . I saw other post also but there is no more solution other then Guice .. so is there any other method by which i can use Atmosphere with Struts2
 Here is my web.xml

        <filter>
                <filter-name>struts2</filter-name>
                <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
        </filter>
        <filter-mapping>
                <filter-name>struts2</filter-name>
                <url-pattern>/*</url-pattern>
        </filter-mapping>
       
        <servlet>
                <description>MeteorServlet</description>
                <servlet-name>MeteorServlet</servlet-name>
                <servlet-class>org.atmosphere.cpr.MeteorServlet</servlet-class>
                <init-param>
                        <param-name>org.atmosphere.servlet</param-name>
                        <param-value>org.atmosphere.samples.chat.MeteorChat</param-value>
                </init-param>
                <load-on-startup>0</load-on-startup>
        </servlet>
       
       
        <servlet-mapping>
                <servlet-name>MeteorServlet</servlet-name>
                <url-pattern>/Meteor</url-pattern>
        </servlet-mapping>

Please help for the same.

Thsanks
Reply | Threaded
Open this post in threaded view
|

[atmosphere-users] Re: Meteor chat with struts 2

Jeanfrancois Arcand-4
Salut,

On 12-01-20 8:27 AM, mukesh7333 wrote:
> Hi All,
>
> When I dont use Struts filter in web.xml my Meteor chat application is
> running correctly
> but when i use struts FilterDispature in web.xml it give an error because
> when meteor send get request, it goes through FilterDispature of struts .
Any exception available? If you can package a test case, we will take a
look.

Thanks!

-- Jeanfrancois


> I
> saw other post also but there is no more solution other then Guice .. so is
> there any other method by which i can use Atmosphere with Struts2
>   Here is my web.xml
>
> <filter>
> <filter-name>struts2</filter-name>
>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> </filter>
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
>
> <servlet>
> <description>MeteorServlet</description>
> <servlet-name>MeteorServlet</servlet-name>
> <servlet-class>org.atmosphere.cpr.MeteorServlet</servlet-class>
> <init-param>
> <param-name>org.atmosphere.servlet</param-name>
> <param-value>org.atmosphere.samples.chat.MeteorChat</param-value>
> </init-param>
> <load-on-startup>0</load-on-startup>
> </servlet>
>
>
> <servlet-mapping>
> <servlet-name>MeteorServlet</servlet-name>
> <url-pattern>/Meteor</url-pattern>
> </servlet-mapping>
>
> Please help for the same.
>
> Thsanks
>
> --
> View this message in context: http://atmosphere-users-mailling-list.2493822.n2.nabble.com/Meteor-chat-with-struts-2-tp7207516p7207516.html
> Sent from the Atmosphere users mailling list mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: [atmosphere-users] Re: Meteor chat with struts 2

mukesh7333
Thanks for your reply

Below is the error return by server.

java.lang.ClassCastException: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to org.apache.catalina.CometFilter
        org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
        org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
        org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
        org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
        org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2008)
        java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        java.lang.Thread.run(Thread.java:662)


please revert back to me..


Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Meteor chat with struts 2

lamadipen
This post has NOT been accepted by the mailing list yet.
In reply to this post by mukesh7333
I have configured struts2 and atmosphere and i have posted question on this link
http://stackoverflow.com/posts/23340310/edit
Please anyone can show me where the request is landing and modify my sample to trigger a action in some way or have some suggestion on that.