Re: Not able to get Wicket Session even though WicketSessionFilter has been added
Any suggestions on the above issue ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-able-to-get-Wicket-Session-even-though-WicketSessionFilter-has-been-added-tp4666469p434.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
Re: Not able to get Wicket Session even though WicketSessionFilter has been added
I'd suggest you to upgrade to something we support (1.5.11+). 1.3.5 is very old. There is 1.3.7 but I cannot guarantee that it will solve the issue. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Jul 17, 2014 at 10:59 AM, rsi610 rahul.i...@lntinfotech.com wrote: Any suggestions on the above issue ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-able-to-get-Wicket-Session-even-though-WicketSessionFilter-has-been-added-tp4666469p434.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
Re: Not able to get Wicket Session even though WicketSessionFilter has been added
On 17 July 2014 09:24, Martin Grigorov mgrigo...@apache.org wrote: I'd suggest you to upgrade to something we support (1.5.11+). 1.3.5 is very old. There is 1.3.7 but I cannot guarantee that it will solve the issue. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Jul 17, 2014 at 10:59 AM, rsi610 rahul.i...@lntinfotech.com wrote: Any suggestions on the above issue ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-able-to-get-Wicket-Session-even-though-WicketSessionFilter-has-been-added-tp4666469p434.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 I was curious about when 1.3.5 was released. A little big of git magic. (thanks to http://stackoverflow.com/questions/6269927/how-can-i-list-all-tags-in-my-git-repository-by-the-date-they-were-created ) refs/tags/wicket-1.3.5 Wed Oct 15 21:16:22 2008 + Very old indeed. -- Peter Henderson
Re: Not able to get Wicket Session even though WicketSessionFilter has been added
My Wicket version is 1.3.5 The doFiler is as follows : public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpServletRequest = ((HttpServletRequest)request); *HttpSession httpSession = httpServletRequest.getSession(false);* if (httpSession != null) { Session session = (Session)httpSession.getAttribute(sessionKey); if (session != null) { // set the session's threadlocal Session.set(session); if (log.isDebugEnabled()) { log.debug(session + session + set as current for + httpServletRequest.getContextPath() + , + httpServletRequest.getServerName()); } } else { if (log.isDebugEnabled()) { log.debug(could not set Wicket session: key + sessionKey + not found in http session for + httpServletRequest.getContextPath() + , + httpServletRequest.getServerName()); } } } else { if (log.isDebugEnabled()) { log.debug(could not set Wicket session: no http session was created yet for + httpServletRequest.getContextPath() + , + httpServletRequest.getServerName()); } } try { // go on with processing chain.doFilter(request, response); } finally { Session.unset(); } } The httpsession in the WicketSessionFilter is null. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-able-to-get-Wicket-Session-even-though-WicketSessionFilter-has-been-added-tp4666469p4666516.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
Re: Not able to get Wicket Session even though WicketSessionFilter has been added
Hi, WicketSessionFilter#doFilter() code looks like: @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { try { WebApplication application = bindApplication(); bindSession(request, application); chain.doFilter(request, response); } finally { cleanupBoundApplicationAndSession(); } } bindApplication() and bindSession() methods set the Application and Session as thread locals and they are available for the chain. You need to attach the Wicket sources and see what happens in #bindSession() method. The code is: private void bindSession(ServletRequest request, WebApplication application) { // find wicket session and bind it to thread HttpSession httpSession = ((HttpServletRequest)request).getSession(false); Session session = getSession(httpSession, application); if (session == null) { if (logger.isDebugEnabled()) { logger.debug(could not set Wicket session: key + sessionKey + not found in http session for + ((HttpServletRequest)request).getContextPath() + , + request.getServerName() + , or http session does not exist); } } else { ThreadContext.setSession(session); } } Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Jul 9, 2014 at 7:49 AM, rsi610 rahul.i...@lntinfotech.com wrote: WicketSessionFilter gets called..Also it has a session with it. http://apache-wicket.1842946.n4.nabble.com/file/n4666503/WicketSession.jpg -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-able-to-get-Wicket-Session-even-though-WicketSessionFilter-has-been-added-tp4666469p4666503.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
Not able to get Wicket Session even though WicketSessionFilter has been added
Hi, I am not able to obtain the wicketsession even though sessionFilter has been added My requirement 1. Click of button on Page 1 (url : http://localhost:7001/abc/def/). open editable Pdf form in new window. 2. on click of submit present on pdf form , call a servlet (configured at http://localhost:7001/abc/def/fgh/ijk). 3. Trying to access the session in this servlet . But of no avail. The session is configured at (/def/* ) *Code in web.xml ** ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC quot;-//Sun Microsystems, Inc.//DTD Web Application 2.3//ENquot; quot;http://java.sun.com/dtd/web-app_2_3.dtdquot; web-app context-param param-nameconfiguration/param-name param-valuedeployment/param-value /context-param filter filter-nameloadablePdfWicketSessionFilter/filter-name filter-class org.apache.wicket.protocol.http.servlet.WicketSessionFilter /filter-class init-param param-namefilterName/param-name param-valueapplicationSession/param-value /init-param /filter filter filter-nameapplicationSession/filter-name filter-class com.marsh.itg.ddeepa.presentation.appcore.MWicketFilter /filter-class init-param param-nameapplicationClassName/param-name param-value com.marsh.itg.abc.presentation.app.view.ApplicationSession /param-value /init-param /filter filter-mapping filter-nameloadablePdfWicketSessionFilter/filter-name url-pattern/abc/def/ghi/url-pattern /filter-mapping filter-mapping filter-nameapplicationSession/filter-name url-pattern/abc/*/url-pattern /filter-mapping servlet servlet-nameloadablePdf/servlet-name servlet-class com.marsh.itg.abc.presentation.quote.servlet.ghi /servlet-class /servlet servlet-mapping servlet-nameProlStartUpServlet/servlet-name url-pattern*.do/url-pattern /servlet-mapping servlet-mapping servlet-nameloadablePdf/servlet-name url-pattern/abc/def/ghi/url-pattern /servlet-mapping /web-app -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-able-to-get-Wicket-Session-even-though-WicketSessionFilter-has-been-added-tp4666469.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
Re: Not able to get Wicket Session even though WicketSessionFilter has been added
I have also added Session.get().bind() on page 1.. that also doesnt help -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-able-to-get-Wicket-Session-even-though-WicketSessionFilter-has-been-added-tp4666469p4666476.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
Re: Not able to get Wicket Session even though WicketSessionFilter has been added
Hi, Put a breakpoint in WicketSessionFilter#doFilter() and see what happens. Is it called at all ? Is there Session thread local ? Etc. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Jul 8, 2014 at 1:46 PM, rsi610 rahul.i...@lntinfotech.com wrote: I have also added Session.get().bind() on page 1.. that also doesnt help -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-able-to-get-Wicket-Session-even-though-WicketSessionFilter-has-been-added-tp4666469p4666476.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
Re: Not able to get Wicket Session even though WicketSessionFilter has been added
WicketSessionFilter gets called..Also it has a session with it. http://apache-wicket.1842946.n4.nabble.com/file/n4666503/WicketSession.jpg -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Not-able-to-get-Wicket-Session-even-though-WicketSessionFilter-has-been-added-tp4666469p4666503.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