Yes, absolutely:
public Session newSession(final Request request, final Response
response)
{
return new MySession(request);
}
On Sun, Mar 18, 2012 at 10:32 PM, Jeremy Thomerson <
[email protected]> wrote:
> On Sun, Mar 18, 2012 at 5:08 PM, Pierre Goupil <[email protected]
> >wrote:
>
> > Good evening,
> >
> > I'm currently in the process of migrating my app from Wicket 1.4 to
> Wicket
> > 1.5. I've read the migration guide and everything seems to go fine,
> except
> > for session management.
> >
> > Here's my code:
> >
> > public class MySession extends WebSession
> > {
> >
> > public static MySession get()
> > {
> > return (MySession)Session.get();
> > }
> >
> > }
> >
> > When call, the get() method gives this stacktrace:
> >
> > Caused by: java.lang.ClassCastException:
> > org.apache.wicket.protocol.http.WebSession cannot be cast to MySession
> >
> > Any help, please?
> >
> > Regards,
> >
> > Pierre Goupil
> >
>
>
> Does your application override newSession and return a new MySession?
>
> --
> Jeremy Thomerson
> http://wickettraining.com
> *Need a CMS for Wicket? Use Brix! http://brixcms.org*
>
--
Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé
assez fort.