Thanks, I'll try that.
What I did while waiting to see what others come up with is dump the servlet
session and see what the key was.
Messy (and error prone as I refactor) but worked in the short term.
Here it is from inside the GWT servlet in case anyone is interested:
private String getTokenFromWicketSession() {
String token = (String) getThreadLocalRequest()
.getSession()
.getAttribute(
"wicket:Glasshost.wicket:com.glasshost.model.entity.user.User.token");
return token;
}
I'm thinking what really needs to happen is to rip out the source of the GWT
RPC sevlet (apache lic after all) and implement a wicket filter (or some
other wicket handler) so the target of a GWT RPC call can be a more *normal*
wicket object.
I'm too new to Wicket to know if that is a reasonable path to try though.
- Brill
-----Original Message-----
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 13, 2008 10:53 PM
To: [email protected]
Subject: Re: Wicket play nicely with GWT
((WebRequestCycle)RequestCycle.get()).getWebRequest().getHttpServletRequest(
).getSession()
should get you the raw http session.
-igor
On Tue, May 13, 2008 at 7:23 PM, Brill Pappin <[EMAIL PROTECTED]> wrote:
> Ok, I've read over several threads on Wicket+GWT and know that are
> several people using the two together.
>
> I've got a nice clean setup that is working all except for one minor
detail.
>
> The problem is that Wicket actually does the authentication and I
> store a token in the sessionStore, however I need to get that token
> back in the non-wicket GWT service servlet.
>
> What I'm currently trying to do is:
>
> String token = (String) RequestCycle.get().getApplication()
> .getSessionStore().getAttribute(
>
> RequestCycle.get().getRequest(),
> User.class.getName() +
> ".token");
>
> But I'm getting a NPE as if the RequestCycle is not initialized or
> something
> :)
>
> So, what patterns are people who integrate GWT and Wicket using?
> There are many I can think of, some right out of the park, but what I
> really need is access to the session vars in a wicket context.
>
> I should also mention that I'm new to Wicket (read: finally have a
> reason to go explore it as I've been meaning to do).
>
> Comments, suggestions?
>
> - Brill Pappin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]