You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Marek Šabo <ms...@buk.cvut.cz> on 2011/04/05 18:30:53 UTC

Ajax onTimer() method not called when running from embedded Jetty

Hi all,

I would like to know whether any of you ran into similar issue: I need 
timer behaviour to repaint panel that displays some data/stats provided 
by a network engine. When I run my app in tomcat or via mvn jetty:run as 
common webapp it gets called.

But in my setup it's feasible to start embedded jetty, add wicket 
servlet programatically (filter doesn't work, haven't investigated yet 
why) and provide wicket with network engine's guice injector. This way I 
can see pages, navigate and list active network session stats. But the 
javascript | onTimer() method  won't be called (chrome, opera, no errors 
in js console).

Any suggestions?

Regards,

Marek

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


Re: Ajax onTimer() method not called when running from embedded Jetty

Posted by Marek Šabo <ms...@buk.cvut.cz>.
Thank you for explanation.

On 04/06/2011 02:01 PM, Martin Grigorov wrote:
> WicketFilter needs to know the filter path it listens at.
> By default it extracts this information from web.xml but since you don't use
> web.xml you need to let Wicket know explicitly.
>
> The sequence is:
> 1) WicketFilter.FILTER_MAPPING_PARAM
> 2) @ServletFilter's initParams (when Servlet 3.0 API is used +
> wicketstuff-servlet3)
> 3) web.xml
>
> wicket-guice has no integration with GuiceServlet so this is not extracted
> from there.
>
> On Wed, Apr 6, 2011 at 1:55 PM, Marek Šabo<ms...@buk.cvut.cz>  wrote:
>
>> Hi,
>>
>> thank you, it helped. If that does not bother you, could you please
>> elaborate a little bit?
>>
>> Reqards,
>>
>> Marek
>>
>>
>> On 04/05/2011 08:37 PM, Martin Grigorov wrote:
>>
>>> you should set
>>> init-param
>>> org.apache.wicket.protocol.http.WicketFilter.FILTER_MAPPING_PARAM
>>> with value == the one you would put in web.xml ->   url-pattern
>>>
>>> On Tue, Apr 5, 2011 at 6:30 PM, Marek Šabo<ms...@buk.cvut.cz>   wrote:
>>>
>>>   Hi all,
>>>> I would like to know whether any of you ran into similar issue: I need
>>>> timer behaviour to repaint panel that displays some data/stats provided
>>>> by a
>>>> network engine. When I run my app in tomcat or via mvn jetty:run as
>>>> common
>>>> webapp it gets called.
>>>>
>>>> But in my setup it's feasible to start embedded jetty, add wicket servlet
>>>> programatically (filter doesn't work, haven't investigated yet why) and
>>>> provide wicket with network engine's guice injector. This way I can see
>>>> pages, navigate and list active network session stats. But the javascript
>>>> |
>>>> onTimer() method  won't be called (chrome, opera, no errors in js
>>>> console).
>>>>
>>>> Any suggestions?
>>>>
>>>> Regards,
>>>>
>>>> Marek
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>


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


Re: Ajax onTimer() method not called when running from embedded Jetty

Posted by Martin Grigorov <mg...@apache.org>.
WicketFilter needs to know the filter path it listens at.
By default it extracts this information from web.xml but since you don't use
web.xml you need to let Wicket know explicitly.

The sequence is:
1) WicketFilter.FILTER_MAPPING_PARAM
2) @ServletFilter's initParams (when Servlet 3.0 API is used +
wicketstuff-servlet3)
3) web.xml

wicket-guice has no integration with GuiceServlet so this is not extracted
from there.

On Wed, Apr 6, 2011 at 1:55 PM, Marek Šabo <ms...@buk.cvut.cz> wrote:

> Hi,
>
> thank you, it helped. If that does not bother you, could you please
> elaborate a little bit?
>
> Reqards,
>
> Marek
>
>
> On 04/05/2011 08:37 PM, Martin Grigorov wrote:
>
>> you should set
>> init-param
>> org.apache.wicket.protocol.http.WicketFilter.FILTER_MAPPING_PARAM
>> with value == the one you would put in web.xml ->  url-pattern
>>
>> On Tue, Apr 5, 2011 at 6:30 PM, Marek Šabo<ms...@buk.cvut.cz>  wrote:
>>
>>  Hi all,
>>>
>>> I would like to know whether any of you ran into similar issue: I need
>>> timer behaviour to repaint panel that displays some data/stats provided
>>> by a
>>> network engine. When I run my app in tomcat or via mvn jetty:run as
>>> common
>>> webapp it gets called.
>>>
>>> But in my setup it's feasible to start embedded jetty, add wicket servlet
>>> programatically (filter doesn't work, haven't investigated yet why) and
>>> provide wicket with network engine's guice injector. This way I can see
>>> pages, navigate and list active network session stats. But the javascript
>>> |
>>> onTimer() method  won't be called (chrome, opera, no errors in js
>>> console).
>>>
>>> Any suggestions?
>>>
>>> Regards,
>>>
>>> Marek
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> 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 <http://jweekend.com/>

Re: Ajax onTimer() method not called when running from embedded Jetty

Posted by Marek Šabo <ms...@buk.cvut.cz>.
Hi,

thank you, it helped. If that does not bother you, could you please 
elaborate a little bit?

Reqards,

Marek

On 04/05/2011 08:37 PM, Martin Grigorov wrote:
> you should set
> init-param org.apache.wicket.protocol.http.WicketFilter.FILTER_MAPPING_PARAM
> with value == the one you would put in web.xml ->  url-pattern
>
> On Tue, Apr 5, 2011 at 6:30 PM, Marek Šabo<ms...@buk.cvut.cz>  wrote:
>
>> Hi all,
>>
>> I would like to know whether any of you ran into similar issue: I need
>> timer behaviour to repaint panel that displays some data/stats provided by a
>> network engine. When I run my app in tomcat or via mvn jetty:run as common
>> webapp it gets called.
>>
>> But in my setup it's feasible to start embedded jetty, add wicket servlet
>> programatically (filter doesn't work, haven't investigated yet why) and
>> provide wicket with network engine's guice injector. This way I can see
>> pages, navigate and list active network session stats. But the javascript |
>> onTimer() method  won't be called (chrome, opera, no errors in js console).
>>
>> Any suggestions?
>>
>> Regards,
>>
>> Marek
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>


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


Re: Ajax onTimer() method not called when running from embedded Jetty

Posted by Martin Grigorov <mg...@apache.org>.
you should set
init-param org.apache.wicket.protocol.http.WicketFilter.FILTER_MAPPING_PARAM
with value == the one you would put in web.xml -> url-pattern

On Tue, Apr 5, 2011 at 6:30 PM, Marek Šabo <ms...@buk.cvut.cz> wrote:

> Hi all,
>
> I would like to know whether any of you ran into similar issue: I need
> timer behaviour to repaint panel that displays some data/stats provided by a
> network engine. When I run my app in tomcat or via mvn jetty:run as common
> webapp it gets called.
>
> But in my setup it's feasible to start embedded jetty, add wicket servlet
> programatically (filter doesn't work, haven't investigated yet why) and
> provide wicket with network engine's guice injector. This way I can see
> pages, navigate and list active network session stats. But the javascript |
> onTimer() method  won't be called (chrome, opera, no errors in js console).
>
> Any suggestions?
>
> Regards,
>
> Marek
>
> ---------------------------------------------------------------------
> 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 <http://jweekend.com/>