If your ThreadLocal is needed within Wicket, shouldn't your filter run
*before* WicketFilter?

Does your filter use any Wicket classes that require something in
o.a.w.ThreadContext?

The basic design should work. We use a filter to manage a ThreadLocal
Hibernate Session for open-session-in-view.

On Mon, Mar 5, 2012 at 1:38 PM, YK <linux_2...@yahoo.fr> wrote:

> Hi,
>
> I'm trying to make example using wicket 1.5.4 and spring work but I keep
> having this exception: org.apache.wicket.WicketRuntimeException: There is
> no
> application attached to current thread...
>
> My example defines also a servlet filter that is applied just after the
> WicketFilter in web.xml.
> This filter uses ThreadLocal to set/unset a variable around each
> request/response cycle.
>
> I've noticed that if I disable the filter, my example works fine, but I
> really need it to to pass a variable via the ThreadLocal: (static final
> ThreadLocal<Map&lt;String, Serializable>> THREAD_OBJECT_CONTEXT = new
> ThreadLocal<Map&lt;String, Serializable>>();)
>
>
> Any idea about why wicket fails to accept such a filter please?
>
> Is there a workaround please?
>
>
> Thanks
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-WicketRuntimeException-There-is-no-application-attached-to-current-thread-tp4447781p4447781.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to