Re: Set Wicket User Session to Servlet's HttpSession

2012-02-10 Thread Nelson Segura
So this means that wicket session cannot be accessed from non wicket
request? I tried to call Session.get().bind() before doing anything
with the session, but it gives me the same error. Notice this is
called in Session.get(), so I cant really call bind.
This was working with no problems in Wicket 1.5.3


java.lang.IllegalArgumentException: Argument 'requestCycle' may not be null.
at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
at 
org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1524)
at org.apache.wicket.Session.get(Session.java:156)


On Mon, Feb 6, 2012 at 2:07 AM, Martin Grigorov  wrote:
> Hi,
>
> As I answered in the ticket - RequestCycle is not created for
> non-Wicket requests. It will be always 'null'.
>
> On Mon, Feb 6, 2012 at 11:15 AM, Kayode Odeyemi  wrote:
>> On Mon, Feb 6, 2012 at 7:18 AM, Martin Grigorov wrote:
>>
>>> Hi,
>>>
>>> On Sat, Feb 4, 2012 at 3:25 PM, Kayode Odeyemi  wrote:
>>> > Hi, thanks.
>>> >
>>> > On Fri, Feb 3, 2012 at 8:05 PM, Serban.Balamaci >> >wrote:
>>> >
>>> >> Hello,
>>> >> It's not really clear what you mean and maybe you need to tell us what
>>> you
>>> >> want to do.
>>> >>
>>> >
>>> > I want to use servlet session object for user authentication and not
>>> > wickets'.
>>> >
>>> >>
>>> >> A Wicket session stores it's attributes into an implementation of the
>>> >> ISessionStore interface, but the default the store is HttpSessionStore,
>>> so
>>> >> the HttpSession. On the other hand, the wicket session can exist in a
>>> >> temporary state for the duration of the request and not have a
>>> HttpSession
>>> >> created. See bind(...) method in HttpSessionStore and you can see the
>>> >> Wicket
>>> >> session object being stored in a  httpsession attribute when the Wicket
>>> >> session needs to be persistent.
>>> >> setAttribute(request, Session.SESSION_ATTRIBUTE_NAME, newSession);
>>> >>
>>> >
>>> > But from what you've just explained, does that mean a wicket session is
>>> > HttpSession? Hence, I can just concentrate on implementing wicket session
>>> > and then retrieve it whenever its required even within a servlet - alas,
>>> > the HelloWorldServlet example which makes use of WicketSessionFilter?
>>>
>>> Yes, Wicket's Session is saved as an attribute in the HttpSession.
>>> And yes, using WicketSessionFilter you can read it in servlets.
>>>
>>>
>> Thanks. I tried this but I keep getting  java.lang.IllegalArgumentException:
>> Argument 'requestCycle' may not be null.
>>
>> This is the reason why I wanted to know if this is a bug that is fixed in a
>> different branch but not yet on the official release.
>>
>> Thanks for the time.
>>
>>> >
>>> >>
>>> >>
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://apache-wicket.1842946.n4.nabble.com/Set-Wicket-User-Session-to-Servlet-s-HttpSession-tp4355593p4355644.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
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > Odeyemi 'Kayode O.
>>> > http://www.sinati.com. t: @charyorde
>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>>
>> --
>> Odeyemi 'Kayode O.
>> http://www.sinati.com. t: @charyorde
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

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



Re: Set Wicket User Session to Servlet's HttpSession

2012-02-06 Thread Martin Grigorov
Hi,

As I answered in the ticket - RequestCycle is not created for
non-Wicket requests. It will be always 'null'.

On Mon, Feb 6, 2012 at 11:15 AM, Kayode Odeyemi  wrote:
> On Mon, Feb 6, 2012 at 7:18 AM, Martin Grigorov wrote:
>
>> Hi,
>>
>> On Sat, Feb 4, 2012 at 3:25 PM, Kayode Odeyemi  wrote:
>> > Hi, thanks.
>> >
>> > On Fri, Feb 3, 2012 at 8:05 PM, Serban.Balamaci > >wrote:
>> >
>> >> Hello,
>> >> It's not really clear what you mean and maybe you need to tell us what
>> you
>> >> want to do.
>> >>
>> >
>> > I want to use servlet session object for user authentication and not
>> > wickets'.
>> >
>> >>
>> >> A Wicket session stores it's attributes into an implementation of the
>> >> ISessionStore interface, but the default the store is HttpSessionStore,
>> so
>> >> the HttpSession. On the other hand, the wicket session can exist in a
>> >> temporary state for the duration of the request and not have a
>> HttpSession
>> >> created. See bind(...) method in HttpSessionStore and you can see the
>> >> Wicket
>> >> session object being stored in a  httpsession attribute when the Wicket
>> >> session needs to be persistent.
>> >> setAttribute(request, Session.SESSION_ATTRIBUTE_NAME, newSession);
>> >>
>> >
>> > But from what you've just explained, does that mean a wicket session is
>> > HttpSession? Hence, I can just concentrate on implementing wicket session
>> > and then retrieve it whenever its required even within a servlet - alas,
>> > the HelloWorldServlet example which makes use of WicketSessionFilter?
>>
>> Yes, Wicket's Session is saved as an attribute in the HttpSession.
>> And yes, using WicketSessionFilter you can read it in servlets.
>>
>>
> Thanks. I tried this but I keep getting  java.lang.IllegalArgumentException:
> Argument 'requestCycle' may not be null.
>
> This is the reason why I wanted to know if this is a bug that is fixed in a
> different branch but not yet on the official release.
>
> Thanks for the time.
>
>> >
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://apache-wicket.1842946.n4.nabble.com/Set-Wicket-User-Session-to-Servlet-s-HttpSession-tp4355593p4355644.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
>> >>
>> >>
>> >
>> >
>> > --
>> > Odeyemi 'Kayode O.
>> > http://www.sinati.com. t: @charyorde
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Odeyemi 'Kayode O.
> http://www.sinati.com. t: @charyorde



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

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



Re: Set Wicket User Session to Servlet's HttpSession

2012-02-06 Thread Kayode Odeyemi
On Mon, Feb 6, 2012 at 7:18 AM, Martin Grigorov wrote:

> Hi,
>
> On Sat, Feb 4, 2012 at 3:25 PM, Kayode Odeyemi  wrote:
> > Hi, thanks.
> >
> > On Fri, Feb 3, 2012 at 8:05 PM, Serban.Balamaci  >wrote:
> >
> >> Hello,
> >> It's not really clear what you mean and maybe you need to tell us what
> you
> >> want to do.
> >>
> >
> > I want to use servlet session object for user authentication and not
> > wickets'.
> >
> >>
> >> A Wicket session stores it's attributes into an implementation of the
> >> ISessionStore interface, but the default the store is HttpSessionStore,
> so
> >> the HttpSession. On the other hand, the wicket session can exist in a
> >> temporary state for the duration of the request and not have a
> HttpSession
> >> created. See bind(...) method in HttpSessionStore and you can see the
> >> Wicket
> >> session object being stored in a  httpsession attribute when the Wicket
> >> session needs to be persistent.
> >> setAttribute(request, Session.SESSION_ATTRIBUTE_NAME, newSession);
> >>
> >
> > But from what you've just explained, does that mean a wicket session is
> > HttpSession? Hence, I can just concentrate on implementing wicket session
> > and then retrieve it whenever its required even within a servlet - alas,
> > the HelloWorldServlet example which makes use of WicketSessionFilter?
>
> Yes, Wicket's Session is saved as an attribute in the HttpSession.
> And yes, using WicketSessionFilter you can read it in servlets.
>
>
Thanks. I tried this but I keep getting  java.lang.IllegalArgumentException:
Argument 'requestCycle' may not be null.

This is the reason why I wanted to know if this is a bug that is fixed in a
different branch but not yet on the official release.

Thanks for the time.

> >
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-wicket.1842946.n4.nabble.com/Set-Wicket-User-Session-to-Servlet-s-HttpSession-tp4355593p4355644.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
> >>
> >>
> >
> >
> > --
> > Odeyemi 'Kayode O.
> > http://www.sinati.com. t: @charyorde
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde


Re: Set Wicket User Session to Servlet's HttpSession

2012-02-05 Thread Martin Grigorov
Hi,

On Sat, Feb 4, 2012 at 3:25 PM, Kayode Odeyemi  wrote:
> Hi, thanks.
>
> On Fri, Feb 3, 2012 at 8:05 PM, Serban.Balamaci wrote:
>
>> Hello,
>> It's not really clear what you mean and maybe you need to tell us what you
>> want to do.
>>
>
> I want to use servlet session object for user authentication and not
> wickets'.
>
>>
>> A Wicket session stores it's attributes into an implementation of the
>> ISessionStore interface, but the default the store is HttpSessionStore, so
>> the HttpSession. On the other hand, the wicket session can exist in a
>> temporary state for the duration of the request and not have a HttpSession
>> created. See bind(...) method in HttpSessionStore and you can see the
>> Wicket
>> session object being stored in a  httpsession attribute when the Wicket
>> session needs to be persistent.
>> setAttribute(request, Session.SESSION_ATTRIBUTE_NAME, newSession);
>>
>
> But from what you've just explained, does that mean a wicket session is
> HttpSession? Hence, I can just concentrate on implementing wicket session
> and then retrieve it whenever its required even within a servlet - alas,
> the HelloWorldServlet example which makes use of WicketSessionFilter?

Yes, Wicket's Session is saved as an attribute in the HttpSession.
And yes, using WicketSessionFilter you can read it in servlets.

>
>>
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Set-Wicket-User-Session-to-Servlet-s-HttpSession-tp4355593p4355644.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
>>
>>
>
>
> --
> Odeyemi 'Kayode O.
> http://www.sinati.com. t: @charyorde



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

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



Re: Set Wicket User Session to Servlet's HttpSession

2012-02-04 Thread Kayode Odeyemi
Hi, thanks.

On Fri, Feb 3, 2012 at 8:05 PM, Serban.Balamaci wrote:

> Hello,
> It's not really clear what you mean and maybe you need to tell us what you
> want to do.
>

I want to use servlet session object for user authentication and not
wickets'.

>
> A Wicket session stores it's attributes into an implementation of the
> ISessionStore interface, but the default the store is HttpSessionStore, so
> the HttpSession. On the other hand, the wicket session can exist in a
> temporary state for the duration of the request and not have a HttpSession
> created. See bind(...) method in HttpSessionStore and you can see the
> Wicket
> session object being stored in a  httpsession attribute when the Wicket
> session needs to be persistent.
> setAttribute(request, Session.SESSION_ATTRIBUTE_NAME, newSession);
>

But from what you've just explained, does that mean a wicket session is
HttpSession? Hence, I can just concentrate on implementing wicket session
and then retrieve it whenever its required even within a servlet - alas,
the HelloWorldServlet example which makes use of WicketSessionFilter?

>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Set-Wicket-User-Session-to-Servlet-s-HttpSession-tp4355593p4355644.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
>
>


-- 
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde


Re: Set Wicket User Session to Servlet's HttpSession

2012-02-03 Thread Serban.Balamaci
Hello,
It's not really clear what you mean and maybe you need to tell us what you
want to do.

A Wicket session stores it's attributes into an implementation of the
ISessionStore interface, but the default the store is HttpSessionStore, so
the HttpSession. On the other hand, the wicket session can exist in a
temporary state for the duration of the request and not have a HttpSession
created. See bind(...) method in HttpSessionStore and you can see the Wicket
session object being stored in a  httpsession attribute when the Wicket
session needs to be persistent. 
setAttribute(request, Session.SESSION_ATTRIBUTE_NAME, newSession);


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Set-Wicket-User-Session-to-Servlet-s-HttpSession-tp4355593p4355644.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



Set Wicket User Session to Servlet's HttpSession

2012-02-03 Thread Kayode Odeyemi
Hi,

Is servlet HttpSession same as Wicket Session? If not,
because I prefer HttpSession, how do I make wicket make use
of HttpSession (server session)?

Thanks

-- 
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde