the page is stateless so the session is not persisted, if you want to force it call getsession().bind();
-igor On Fri, Apr 23, 2010 at 9:42 AM, sonxurxo <[email protected]> wrote: > > Hi all, > when I access pages like this : > > public BasePage(PageParameters pageParameters) { > super(pageParameters); > Ok ok = new Ok(); > final JSON response = JSONSerializer.toJSON(ok); > getRequestCycle().setRequestTarget(new IRequestTarget() { > > public void detach(RequestCycle requestCycle) {} > > public void respond(RequestCycle requestCycle) { > > requestCycle.getResponse().write(response.toString()); > } > }); > } > , wicket creates a session each time I access, instead of creating it on the > first request and maintaining it. The same occurs if I take the OutputWriter > of the response and write "manually" on it. > Is there a way to avoid this behaviour? Maybe I have to tell wicket that I'm > writing JSON or XML directly? > Thank you in advance > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Session-created-on-each-request-when-writing-JSON-or-XML-response-tp2062504p2062504.html > Sent from the Wicket - User mailing list archive at Nabble.com. > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
