You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by esajjkh <pr...@gmail.com> on 2012/08/30 10:46:24 UTC

Wicket 6 and Atmosphere framework integration

Hi,

I'm trying to use Atmosphere (AtmosphereServlet) with wicket 6. Any
example/code snippet that may help me please?
I have already checked the example on wicketstuff for the Atmosphere
integration but it does not contain any configuration details for the
framework e.g. Web.xml etc.


Thank you! 



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-and-Atmosphere-framework-integration-tp4651637.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6 and Atmosphere framework integration

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Maybe it is related to https://github.com/Atmosphere/atmosphere/issues/595
Describe your issue there in more details. "Error pages hurt me"
doesn't explain what kind of sadists are they :-)

On Fri, Oct 5, 2012 at 4:37 PM, esajjkh <pr...@gmail.com> wrote:
> Hello Martin,
> Great, wicket 6.1.0 is rocking :) however, wicket error pages are still
> hurting me.
> I'm using atmosphereServlet, my web.xml looks like this:
>  ...............
> <servlet>
>         <servlet-name>wicket.mavenproject1</servlet-name>
>         <servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
>         <init-param>
>             <param-name>applicationClassName</param-name>
>
> <param-value>com.ericsson.mavenproject1.WicketApplication</param-value>
>         </init-param>
>         <init-param>
>             <param-name>org.atmosphere.useWebSocket</param-name>
>             <param-value>true</param-value>
>         </init-param>
>         <init-param>
>             <param-name>org.atmosphere.useNative</param-name>
>             <param-value>true</param-value>
>         </init-param>
>
>         <init-param>
>             <param-name>filterMappingUrlPattern</param-name>
>             <param-value>/ssp/*</param-value>
>         </init-param>
>
>         <load-on-startup>0</load-on-startup>
>     </servlet>
>
>
>
>
>
>     <error-page>
>         <error-code>403</error-code>
>         <location>/error/error404</location>
>     </error-page>
>     <error-page>
>         <error-code>404</error-code>
>         <location>/error/error404</location>
>     </error-page>
>     <error-page>
>         <error-code>503</error-code>
>         <location>/error/error404</location>
>     </error-page>
>
>     <servlet-mapping>
>         <servlet-name>wicket.mavenproject1</servlet-name>
>         <url-pattern>/ssp/*</url-pattern>
>     </servlet-mapping>
>
> Am I missing something?
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-and-Atmosphere-framework-integration-tp4651637p4652698.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6 and Atmosphere framework integration

Posted by esajjkh <pr...@gmail.com>.
Hello Martin,
Great, wicket 6.1.0 is rocking :) however, wicket error pages are still
hurting me.  
I'm using atmosphereServlet, my web.xml looks like this:
 ...............
<servlet>
        <servlet-name>wicket.mavenproject1</servlet-name>
        <servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
        <init-param>
            <param-name>applicationClassName</param-name>
           
<param-value>com.ericsson.mavenproject1.WicketApplication</param-value>
        </init-param>
        <init-param>
            <param-name>org.atmosphere.useWebSocket</param-name>
            <param-value>true</param-value>
        </init-param>
        <init-param>
            <param-name>org.atmosphere.useNative</param-name>
            <param-value>true</param-value>
        </init-param>

        <init-param>
            <param-name>filterMappingUrlPattern</param-name>
            <param-value>/ssp/*</param-value>
        </init-param>
        
        <load-on-startup>0</load-on-startup>
    </servlet>
    
    



    <error-page>
        <error-code>403</error-code>
        <location>/error/error404</location>
    </error-page>
    <error-page>
        <error-code>404</error-code>
        <location>/error/error404</location>
    </error-page>
    <error-page>
        <error-code>503</error-code>
        <location>/error/error404</location>
    </error-page>
    
    <servlet-mapping>
        <servlet-name>wicket.mavenproject1</servlet-name>
        <url-pattern>/ssp/*</url-pattern>
    </servlet-mapping>

Am I missing something?  



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-and-Atmosphere-framework-integration-tp4651637p4652698.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6 and Atmosphere framework integration

Posted by esajjkh <pr...@gmail.com>.
Thank you Martin. I have created an issue, looking forward for a fix. 
https://issues.apache.org/jira/browse/WICKET-4742





--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-and-Atmosphere-framework-integration-tp4651637p4651714.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6 and Atmosphere framework integration

Posted by Martin Grigorov <mg...@apache.org>.
http://wicket.apache.org/start/quickstart.html
http://wicket.apache.org/help/

On Fri, Aug 31, 2012 at 10:29 AM, esajjkh <pr...@gmail.com> wrote:
> Hello Martin,
> I have never did it before, can you please help me how I can do that? thank
> you
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-and-Atmosphere-framework-integration-tp4651637p4651670.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6 and Atmosphere framework integration

Posted by esajjkh <pr...@gmail.com>.
Hello Martin,
I have never did it before, can you please help me how I can do that? thank
you



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-and-Atmosphere-framework-integration-tp4651637p4651670.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6 and Atmosphere framework integration

Posted by Martin Grigorov <mg...@apache.org>.
I think AtmosphereServlet should delegate the processing to
WicketFilter internally.
I.e. if there is a request to /error/error404 then Wicket should be
asked to handle it and it will use the configured page.

Please create a quickstart application and attach it to a ticket in Jira.

On Thu, Aug 30, 2012 at 3:48 PM, esajjkh <pr...@gmail.com> wrote:
> I have some error pages that are configured in web.xml e.g.
>
>  <error-page>
>         <error-code>404</error-code>
>         <location>/error/error404</location>
>     </error-page>
>
> and "/error/error404" is mounted to PageNotFoundError.class in
> MyWebApplication class. These error pages only work with WicketFilter but as
> I am using AtmosphereServlet so all the application requests are dispatched
> to this servlet and therefore my customized page does not show up for 404.
>
> I have fixed it by writing my own Servlet e.g MyErrorHandler I check the
> statuscode and redirect to the mounted page like this:
>
>  Integer statusCode = (Integer)
> request.getAttribute("javax.servlet.error.status_code");
> .... some check if the status code = 404
>  response.sendRedirect(response.encodeRedirectURL(error404));
>
>
> and web.xml look like this:
> <error-page>
>         <error-code>404</error-code>
>         <location>/MyErrorHandler</location>
>     </error-page>
>
> MyErrorHAndler is a servlet so it is defined and mapped in web.xml as well.
> It is working.
>
> I'm interested to know if there is any better way to fix this problem.
>
> Thanks for the help!
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-and-Atmosphere-framework-integration-tp4651637p4651649.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6 and Atmosphere framework integration

Posted by esajjkh <pr...@gmail.com>.
I have some error pages that are configured in web.xml e.g.

 <error-page>
        <error-code>404</error-code>
        <location>/error/error404</location>
    </error-page>

and "/error/error404" is mounted to PageNotFoundError.class in
MyWebApplication class. These error pages only work with WicketFilter but as
I am using AtmosphereServlet so all the application requests are dispatched
to this servlet and therefore my customized page does not show up for 404.

I have fixed it by writing my own Servlet e.g MyErrorHandler I check the
statuscode and redirect to the mounted page like this:

 Integer statusCode = (Integer)
request.getAttribute("javax.servlet.error.status_code");
.... some check if the status code = 404
 response.sendRedirect(response.encodeRedirectURL(error404));


and web.xml look like this:
<error-page>
        <error-code>404</error-code>
        <location>/MyErrorHandler</location>
    </error-page>

MyErrorHAndler is a servlet so it is defined and mapped in web.xml as well. 
It is working. 

I'm interested to know if there is any better way to fix this problem.

Thanks for the help!












--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-and-Atmosphere-framework-integration-tp4651637p4651649.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6 and Atmosphere framework integration

Posted by Martin Grigorov <mg...@apache.org>.
Please be more specific what exactly you did and what still doesn't work.

On Thu, Aug 30, 2012 at 2:05 PM, esajjkh <pr...@gmail.com> wrote:
> I stuck with the error pages, this integration is not working to display the
> customized wicket error pages e.g. error404  as we can not use WicektFilter
> together with AtmospherServlet.
> Any help will be appreciated, thanks.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-and-Atmosphere-framework-integration-tp4651637p4651647.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6 and Atmosphere framework integration

Posted by esajjkh <pr...@gmail.com>.
I stuck with the error pages, this integration is not working to display the
customized wicket error pages e.g. error404  as we can not use WicektFilter
together with AtmospherServlet.
Any help will be appreciated, thanks.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-and-Atmosphere-framework-integration-tp4651637p4651647.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6 and Atmosphere framework integration

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

In wicket-examples there is a complete application. The important
config is in web.xml and atmosphere.xml

On Thu, Aug 30, 2012 at 10:46 AM, esajjkh <pr...@gmail.com> wrote:
> Hi,
>
> I'm trying to use Atmosphere (AtmosphereServlet) with wicket 6. Any
> example/code snippet that may help me please?
> I have already checked the example on wicketstuff for the Atmosphere
> integration but it does not contain any configuration details for the
> framework e.g. Web.xml etc.
>
>
> Thank you!
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-and-Atmosphere-framework-integration-tp4651637.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org