Re: Wicket fails to set seesion and request attributes for external webpages
No response.. I'll try re-posting this: Basically I want a wicket page to forward the user to a non-wicket page and pass some request attributes to that non-wicket page. I have not been successful in doing so. See the code I use below. Any help would be appreciated. thanks, Benny. Benny Weingarten wrote: Hello. I am working on a Jboss server, with a security-constraint set on the same path as the wicket filter. Thus, all wicket pages are under the security constraint. To support that I have a login page outside the path of security-constraint. I also have an error page in the same location as the login page: Path: / login.jsp / error.jsp /folder_under_constraint/Wicket_Class1.java /folder_under_constraint/Wicket_Class2.java . . /folder_under_constraint/Wicket_Classn.java In case of an error I want to redirect to invalidate the session, redirect to the error page, and pass an error message to the error page. I haven't been able to do this. It appears that wicket doesn't pass session or request attributes to external pages. What am I doing wrong? Session.get().invalidate(); // none of the following setAttribute statements actually mange to pass any http attributes to the error page. httpServletRequest.setAttribute(some_attribute, some_value); HttpServletRequest.getSession().setAttribute(some_attribute, some_value); request.getParameterMap().put(some_attribute, some_value); throw new org.apache.wicket.RedirectToUrlException(/some_page_not_under_wicket_filter.jsp); thanks, Benny. -- View this message in context: http://www.nabble.com/Wciket-fails-to-set-seesion-and-request-attributes-for-external-webpages-tp19438970p19477610.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]
Re: Wicket fails to set seesion and request attributes for external webpages
it is quiet obvious that if you issue a redirect then a new request is created from the client to the server, and thus new request/response objects - so instead of setting your paramters into the request object you have to encode them into the url that you give to the redirect exception. -igor On Sat, Sep 13, 2008 at 11:09 PM, Benny Weingarten [EMAIL PROTECTED] wrote: No response.. I'll try re-posting this: Basically I want a wicket page to forward the user to a non-wicket page and pass some request attributes to that non-wicket page. I have not been successful in doing so. See the code I use below. Any help would be appreciated. thanks, Benny. Benny Weingarten wrote: Hello. I am working on a Jboss server, with a security-constraint set on the same path as the wicket filter. Thus, all wicket pages are under the security constraint. To support that I have a login page outside the path of security-constraint. I also have an error page in the same location as the login page: Path: / login.jsp / error.jsp /folder_under_constraint/Wicket_Class1.java /folder_under_constraint/Wicket_Class2.java . . /folder_under_constraint/Wicket_Classn.java In case of an error I want to redirect to invalidate the session, redirect to the error page, and pass an error message to the error page. I haven't been able to do this. It appears that wicket doesn't pass session or request attributes to external pages. What am I doing wrong? Session.get().invalidate(); // none of the following setAttribute statements actually mange to pass any http attributes to the error page. httpServletRequest.setAttribute(some_attribute, some_value); HttpServletRequest.getSession().setAttribute(some_attribute, some_value); request.getParameterMap().put(some_attribute, some_value); throw new org.apache.wicket.RedirectToUrlException(/some_page_not_under_wicket_filter.jsp); thanks, Benny. -- View this message in context: http://www.nabble.com/Wciket-fails-to-set-seesion-and-request-attributes-for-external-webpages-tp19438970p19477610.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tracking logged in users / SessionStore questions
Thank you for your help, Igor. igor.vaynberg wrote: no, the session cookie is set and managed by the servlet container -igor On Sat, Sep 13, 2008 at 1:56 AM, behlma [EMAIL PROTECTED] wrote: Hi Igor, actually, the wrong cookie path is set. Could be that this is due to nginx (my webserver). Just to make sure, is there a way to set the session cookie path through wicket? igor.vaynberg wrote: are your cookies disabled? -igor On Thu, Sep 11, 2008 at 11:46 PM, behlma [EMAIL PROTECTED] wrote: Now another question has popped up. My bulletin board overview page, the one displaying all currently active/guests users and forums is a (stateless) BookmarkablePage. To be able to track the (guest) users however, I'm calling getSession().bind() in the page's constructor. The session gets bound the very first time I access the page (and I'm displayed as a guest user). The url (www.myurl.com/forum) at this point however has no notion of jsessionid whatsoever, so if I simply refresh the page, a new session gets bound, now displaying two guests. Consequently, for every refresh a new session is spawned. Now I understand that this is the correct behaviour, but is there any way around people being able to spawn thousands of sessions :) ? -- View this message in context: http://www.nabble.com/Tracking-logged-in-users---SessionStore-questions-tp19273568p19450432.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tracking-logged-in-users---SessionStore-questions-tp19273568p19468728.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tracking-logged-in-users---SessionStore-questions-tp19273568p19479686.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]
Wicket session! Best way??
Which the best way to initiate a session with wicket?? i'm beginner with wicket tanks -- --- Murilo Vieira Aguiar Analista de Sistemas/Desenvolvedor JAVA Tel. Comercial: [55] (63) 3218-1188 Secretaria do Planejamento/TO Tel. Celular: [55] (63) 8404-4479 ---
Re: wicket:message in the title
Label label = new Label(pageTitle, new ResourceModel(pageTitle); label.setRenderBodyOnly(true); add(label); title wicket:id=pageTitle[localized title/title On Sun, Sep 14, 2008 at 4:17 PM, Luther Baker [EMAIL PROTECTED] wrote: Is there a way to put a wicket:message in the title tag? This keeps rendering: titlewicket:message key=pageTitlePlaceholder Text/wicket:message/title* * from this: titlewicket:message key=pageTitle//title* * Of course, it displays everything nested between the title tags: wicket:message key=pageTitleValid Page Title/wicket:message in the browser caption bar. The substitution happens just fine - but the wicket ... text all appears in the title. This page talks http://cwiki.apache.org/WICKET/everything-about-wicket-internationalization.html talks about expanding in the attribute of an input but I don't see syntax to replace the whole thing. I tried this but not luck: wicket:message key=pageTitle/. I read somewhere that I can turn off all the wicket syntax from showing up on the page ... do I need to do that or is there a defined way to use the wicket:message mechanism in the title? I could also try the Label object in the Java - but hoping to use the .properties file. Thanks, -Luther -- Ryan Gravener http://twitter.com/ryangravener
Re: wicket:message in the title
if you enable stripping of wicket tags (enabled by default in deployment mode) wicket:message tags wont render. -igor On Sun, Sep 14, 2008 at 1:17 PM, Luther Baker [EMAIL PROTECTED] wrote: Is there a way to put a wicket:message in the title tag? This keeps rendering: titlewicket:message key=pageTitlePlaceholder Text/wicket:message/title* * from this: titlewicket:message key=pageTitle//title* * Of course, it displays everything nested between the title tags: wicket:message key=pageTitleValid Page Title/wicket:message in the browser caption bar. The substitution happens just fine - but the wicket ... text all appears in the title. This page talks http://cwiki.apache.org/WICKET/everything-about-wicket-internationalization.html talks about expanding in the attribute of an input but I don't see syntax to replace the whole thing. I tried this but not luck: wicket:message key=pageTitle/. I read somewhere that I can turn off all the wicket syntax from showing up on the page ... do I need to do that or is there a defined way to use the wicket:message mechanism in the title? I could also try the Label object in the Java - but hoping to use the .properties file. Thanks, -Luther - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]