ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes
I'm migrating to wicket 6.23, createPage() is working as expected in many modules, but not in the below scenario. There is a search modal window in the application, which is used to search data and keep the entire Page in session to retrieve the data back from the session (for the Back button functionality). *Issue:* The search window is just working for 10 to 15 minutes as expected and then loading Login Page suddenly. In debug: (I verified the below in the eclipse debugging mode) 1. Returning page from session 2. Page from session is *NOT *null. 3. Session ID is *NOT *modified anywhere in the application. 4. It is just happening only in the search window until I'm clearing the Search Page object (SrcPage) . But application is not asking me to re-login once it happened. *Code snippet:* public Page createPage() { return AppSession.getObjAppShell().getSrcPage(); }); *Reproducing Issue:* I can reproduce the issue by replacing the session in the createPage() block, but I'm not sure whether the problem is session or something else. Example; public Page createPage() { Session.get().replaceSession();// used to reproduce the issue. return AppSession.getObjAppShell().getSrcPage(); }); *Any help?* Thank you.
Re: ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes
Hi, What is the session-timeout ? Can you show the html page header ? and any java code that modify it. François > Le 31 août 2016 à 15:49, durairaj t a écrit : > > I'm migrating to wicket 6.23, createPage() is working as expected in many > modules, but not in the below scenario. > > > There is a search modal window in the application, which is used to search > data and keep the entire Page in session to retrieve the data back from the > session (for the Back button functionality). > > *Issue:* > > The search window is just working for 10 to 15 minutes as expected and then > loading Login Page suddenly. > > In debug: (I verified the below in the eclipse debugging mode) > > 1. Returning page from session > 2. Page from session is *NOT *null. > 3. Session ID is *NOT *modified anywhere in the application. > 4. It is just happening only in the search window until I'm clearing the > Search Page object (SrcPage) . But application is not asking me to re-login > once it happened. > > *Code snippet:* > > public Page createPage() { > return AppSession.getObjAppShell().getSrcPage(); > }); > > > *Reproducing Issue:* > > I can reproduce the issue by replacing the session in the createPage() > block, but I'm not sure whether the problem is session or something else. > > Example; > > public Page createPage() { > Session.get().replaceSession();// used to reproduce the issue. >return > AppSession.getObjAppShell().getSrcPage(); > }); > > > *Any help?* > > > > > Thank you. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes
Thank you for your quick response. *Session:* 30 minutes. *Html Header:* http://www.w3.org/TR/html4/loose.dtd";> http://wicket.apache.org";> - - //credit: http://psacake.com/web/js.asp function imposeMaxLength(Object, evt, MaxLen) { var e = window.event ? event.keyCode : evt.which if (e == 8 || e == 46 || (e >= 37 && e <= 40)) return true; //bs, del, arrows return (Object.value.length <= MaxLen); } div.wicket-aa { font-family: sans-serif; font-size: 12px; background-color: white; border-width: 2px; border-color: gray; border-style: solid; padding: 2px; margin: 1px 0 0 0; text-align: left; width: 120px; } div.wicket-aa ul { list-style: none; padding: 2px; margin: 0; width: 100px; } div.wicket-aa ul li.selected { background-color: #DEEFF7; padding: 2px; margin: 0; width: 100px; } div.imxt-vista tr.imxt-grid-row:hover td.imxt-cell, div.imxt-vista tr.imxt-grid-row:hover td.imxt-sorted {} *Java Code:* String timeout= "175"; if(AppSession.getObjAimShell() != null && AppSession.getObjAimShell().getTimeoutLimit() !=null) timeout = "" + ((AppSession.getObjAimShell().getTimeoutLimit() * 0.9)*1000); final Model sessionTimeoutInterval = new Model(timeout); HiddenField sessionTimeoutIntervalField = new HiddenField("sessionTimeoutInterval", sessionTimeoutInterval) ; sessionTimeoutIntervalField.setOutputMarkupId(true); sessionTimeoutIntervalField.setMarkupId("sessionTimeoutInterval"); add(sessionTimeoutIntervalField); *Java Script:* var sessionPingTime = 175; var sessionTimerId = null; function resetSessionTimer() { try{ if(document.getElementById('sessionTimeoutInterval')) { sessionPingTime = document.getElementById('sessionTimeoutInterval').value; } if(parent) { parent.clearTimeout(parent.sessionTimerId); parent.sessionTimerId = null; parent.sessionTimerId = parent.setTimeout("windowCloseSignOff();", sessionPingTime); }else { clearTimeout(parent.sessionTimerId); sessionTimerId = null; sessionTimerId = setTimeout("windowCloseSignOff();", sessionPingTime); } }catch(c){showScriptError(c, 'resetSessionTimer');} } On Wed, Aug 31, 2016 at 10:05 AM, Francois Meillet < francois.meil...@gmail.com> wrote: > Hi, > > What is the session-timeout ? > Can you show the html page header ? and any java code that modify it. > > François > > > > > Le 31 août 2016 à 15:49, durairaj t a écrit : > > > > I'm migrating to wicket 6.23, createPage() is working as expected in > many > > modules, but not in the below scenario. > > > > > > There is a search modal window in the application, which is used to > search > > data and keep the entire Page in session to retrieve the data back from > the > > session (for the Back button functionality). > > > > *Issue:* > > > > The search window is just working for 10 to 15 minutes as expected and > then > > loading Login Page suddenly. > > > > In debug: (I verified the below in the eclipse debugging mode) > > > > 1. Returning page from session > > 2. Page from session is *NOT *null. > > 3. Session ID is *NOT *modified anywhere in the application. > > 4. It is just happening only in the search window until I'm clearing the > > Search Page object (SrcPage) . But application is not asking me to > re-login > > once it happened. > > > > *Code snippet:* > > > > public Page createPage() { > > return AppSession.getObjAppShell().getSrcPage(); > > }); > > > > > > *Reproducing Issue:* > > > > I can reproduce the issue by replacing the session in the createPage() > > block, but I'm not sure whether the problem is session or something else. > > > > Example; > > > > public Page createPage() { > > Session.get().replaceSession();// used to reproduce the issue. > >return > > AppSession.getObjAppShell().getSrcPage(); > > }); > > > > > > *Any help?* > > > > > > > > > > Thank you. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes
Javadoc from Session # replaceSession() says : Call() upon login to protect against session fixation. Until Wicket version 6.21 the destroy method did not set the session id to null. In 6.23, Session # destroy() set session#id to null, this is why Login Page is loaded. Hope this helps François > Le 31 août 2016 à 16:21, durairaj t a écrit : > > Thank you for your quick response. > > *Session:* 30 minutes. > > *Html Header:* > > http://www.w3.org/TR/html4/loose.dtd";> > http://wicket.apache.org";> > > > > > > > > > - > - > > > > > > href="Calendar/css/border-radius.css" /> > href="Calendar/css/steel/steel.css" /> > > > > src="javascripts/pageBlocking.js"> > src="javascripts/aim-hrs-autocomplete.js"> > > > > > src="jspspellcheck/spellcheck-caller.js"> > > > > >//credit: http://psacake.com/web/js.asp >function imposeMaxLength(Object, evt, MaxLen) { >var e = window.event ? event.keyCode : evt.which >if (e == 8 || e == 46 || (e >= 37 && e <= 40)) return true; > //bs, del, arrows >return (Object.value.length <= MaxLen); >} > > > > > >div.wicket-aa { >font-family: sans-serif; >font-size: 12px; >background-color: white; >border-width: 2px; >border-color: gray; >border-style: solid; >padding: 2px; >margin: 1px 0 0 0; >text-align: left; >width: 120px; >} > >div.wicket-aa ul { >list-style: none; >padding: 2px; >margin: 0; >width: 100px; >} > >div.wicket-aa ul li.selected { >background-color: #DEEFF7; >padding: 2px; >margin: 0; >width: 100px; >} > >div.imxt-vista tr.imxt-grid-row:hover td.imxt-cell, >div.imxt-vista tr.imxt-grid-row:hover td.imxt-sorted {} > > > > > > > *Java Code:* > > > > String timeout= "175"; > if(AppSession.getObjAimShell() != null && > AppSession.getObjAimShell().getTimeoutLimit() !=null) > timeout = "" + ((AppSession.getObjAimShell().getTimeoutLimit() * 0.9)*1000); > final Model sessionTimeoutInterval = new Model(timeout); > HiddenField sessionTimeoutIntervalField = new > HiddenField("sessionTimeoutInterval", sessionTimeoutInterval) ; > sessionTimeoutIntervalField.setOutputMarkupId(true); > sessionTimeoutIntervalField.setMarkupId("sessionTimeoutInterval"); > add(sessionTimeoutIntervalField); > > > *Java Script:* > var sessionPingTime = 175; > var sessionTimerId = null; > > function resetSessionTimer() { > try{ > if(document.getElementById('sessionTimeoutInterval')) { > sessionPingTime = document.getElementById('sessionTimeoutInterval').value; > } > if(parent) { > parent.clearTimeout(parent.sessionTimerId); > parent.sessionTimerId = null; > parent.sessionTimerId = parent.setTimeout("windowCloseSignOff();", > sessionPingTime); > }else { > clearTimeout(parent.sessionTimerId); > sessionTimerId = null; > sessionTimerId = setTimeout("windowCloseSignOff();", sessionPingTime); > } > }catch(c){showScriptError(c, 'resetSessionTimer');} > } > > > On Wed, Aug 31, 2016 at 10:05 AM, Francois Meillet < > francois.meil...@gmail.com> wrote: > >> Hi, >> >> What is the session-timeout ? >> Can you show the html page header ? and any java code that modify it. >> >> François >> >> >> >>> Le 31 août 2016 à 15:49, durairaj t a écrit : >>> >>> I'm migrating to wicket 6.23, createPage() is working as expected in >> many >>> modules, but not in the below scenario. >>> >>> >>> There is a search modal window in the application, which is used to >> search >>> data and keep the entire Page in session to retrieve the data back from >> the >>> session (for the Back button functionality). >>> >>> *Issue:* >>> >>> The search window is just working for 10 to 15 minutes as expected and >> then >>> loading Login Page suddenly. >>> >>> In debug: (I verified the below in the eclipse debugging mode) >>> >>> 1. Returning page from session >>> 2. Page from session is *NOT *null. >>> 3. Session ID is *NOT *modified anywhere in the application. >>> 4. It is just happening only in the search window until I'm clearing the >>> Search Page object (SrcPage) . But application is not asking me to >> re-login >>> once it happened. >>> >>> *Code snippet:* >>> >>> public Page createPage() { >>> return AppSession.getObjAppShell().getSrcPage(); >>> }); >>> >>> >>> *Reproducing Issue:* >>> >>> I can reproduce the issue by replacing the session in the createPage() >>> block, but I'm not sure whether the problem is session or something else. >>> >>> Example; >>> >>> public Page createPage() { >>> Session.get().replaceSession();// used to reproduce the issue. >>>
Re: ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes
I got the same issue in Wicket 1.5, so I migrated it to 6.23, but still it is happening. Moreover, I used "*Session.get().replaceSession()**;*" just to reproduce the issue. it will not be in the actual application code. and I just used "* WebSession.get().clear(); *, *Session.get().clear(); , * *WebSession.get().**replaceSession()*" to reproduce the issue. they are also loading login page as it is happening in the application. I don't know the exact code or component or reason for this issue. On Wed, Aug 31, 2016 at 10:51 AM, Francois Meillet < francois.meil...@gmail.com> wrote: > Javadoc from Session # replaceSession() says : Call() upon login to > protect against session fixation. > > Until Wicket version 6.21 the destroy method did not set the session id to > null. > In 6.23, Session # destroy() set session#id to null, this is why Login > Page is loaded. > > Hope this helps > > François > > > > > Le 31 août 2016 à 16:21, durairaj t a écrit : > > > > Thank you for your quick response. > > > > *Session:* 30 minutes. > > > > *Html Header:* > > > > > http://www.w3.org/TR/html4/loose.dtd";> > > http://wicket.apache.org";> > > > > > > /> > > > > > > > > > > > > - > > - > > > > > > > > > > /> > > > href="Calendar/css/border-radius.css" /> > > > href="Calendar/css/steel/steel.css" /> > > > > > > > > > src="javascripts/pageBlocking.js"> > > > src="javascripts/aim-hrs-autocomplete.js"> > > > > > > > > > > > > src="jspspellcheck/spellcheck-caller.js"> > > > > > > > > > >//credit: http://psacake.com/web/js.asp > >function imposeMaxLength(Object, evt, MaxLen) { > >var e = window.event ? event.keyCode : evt.which > >if (e == 8 || e == 46 || (e >= 37 && e <= 40)) return true; > > //bs, del, arrows > >return (Object.value.length <= MaxLen); > >} > > > > > > > > > > > >div.wicket-aa { > >font-family: sans-serif; > >font-size: 12px; > >background-color: white; > >border-width: 2px; > >border-color: gray; > >border-style: solid; > >padding: 2px; > >margin: 1px 0 0 0; > >text-align: left; > >width: 120px; > >} > > > >div.wicket-aa ul { > >list-style: none; > >padding: 2px; > >margin: 0; > >width: 100px; > >} > > > >div.wicket-aa ul li.selected { > >background-color: #DEEFF7; > >padding: 2px; > >margin: 0; > >width: 100px; > >} > > > >div.imxt-vista tr.imxt-grid-row:hover td.imxt-cell, > >div.imxt-vista tr.imxt-grid-row:hover td.imxt-sorted {} > > > > > > > > > > > > > > *Java Code:* > > > > > > > > String timeout= "175"; > > if(AppSession.getObjAimShell() != null && > > AppSession.getObjAimShell().getTimeoutLimit() !=null) > > timeout = "" + ((AppSession.getObjAimShell().getTimeoutLimit() * > 0.9)*1000); > > final Model sessionTimeoutInterval = new Model(timeout); > > HiddenField sessionTimeoutIntervalField = new > > HiddenField("sessionTimeoutInterval", sessionTimeoutInterval) ; > > sessionTimeoutIntervalField.setOutputMarkupId(true); > > sessionTimeoutIntervalField.setMarkupId("sessionTimeoutInterval"); > > add(sessionTimeoutIntervalField); > > > > > > *Java Script:* > > var sessionPingTime = 175; > > var sessionTimerId = null; > > > > function resetSessionTimer() { > > try{ > > if(document.getElementById('sessionTimeoutInterval')) { > > sessionPingTime = document.getElementById('sessionTimeoutInterval'). > value; > > } > > if(parent) { > > parent.clearTimeout(parent.sessionTimerId); > > parent.sessionTimerId = null; > > parent.sessionTimerId = parent.setTimeout("windowCloseSignOff();", > > sessionPingTime); > > }else { > > clearTimeout(parent.sessionTimerId); > > sessionTimerId = null; > > sessionTimerId = setTimeout("windowCloseSignOff();", sessionPingTime); > > } > > }catch(c){showScriptError(c, 'resetSessionTimer');} > > } > > > > > > On Wed, Aug 31, 2016 at 10:05 AM, Francois Meillet < > > francois.meil...@gmail.com> wrote: > > > >> Hi, > >> > >> What is the session-timeout ? > >> Can you show the html page header ? and any java code that modify it. > >> > >> François > >> > >> > >> > >>> Le 31 août 2016 à 15:49, durairaj t a écrit : > >>> > >>> I'm migrating to wicket 6.23, createPage() is working as expected in > >> many > >>> modules, but not in the below scenario. > >>> > >>> > >>> There is a search modal window in the application, which is used to > >> search > >>> data and keep the entire Page in session to retrieve the data back from > >> the > >>> session (for the Back button functionality). > >>> > >>> *Issue:* > >>> > >>> The search window is just working for 10 to 15 minute
Re: ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes
Hi, Put a breakpoint at RequestCycle#setResponsePage(Class, PageParameters) and see who and why is calling it. This will tell you the reason. If this doesn't help then put breakpoints in RestartReponseAtInterceptPageException constructors. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Aug 31, 2016 at 5:06 PM, durairaj t wrote: > I got the same issue in Wicket 1.5, so I migrated it to 6.23, but still it > is happening. > > Moreover, I used "*Session.get().replaceSession()**;*" just to reproduce > the issue. it will not be in the actual application code. > > and I just used "* WebSession.get().clear(); *, *Session.get().clear(); , * > *WebSession.get().**replaceSession()*" to reproduce the issue. they are > also loading login page as it is happening in the application. > > I don't know the exact code or component or reason for this issue. > > > On Wed, Aug 31, 2016 at 10:51 AM, Francois Meillet < > francois.meil...@gmail.com> wrote: > > > Javadoc from Session # replaceSession() says : Call() upon login to > > protect against session fixation. > > > > Until Wicket version 6.21 the destroy method did not set the session id > to > > null. > > In 6.23, Session # destroy() set session#id to null, this is why Login > > Page is loaded. > > > > Hope this helps > > > > François > > > > > > > > > Le 31 août 2016 à 16:21, durairaj t a écrit : > > > > > > Thank you for your quick response. > > > > > > *Session:* 30 minutes. > > > > > > *Html Header:* > > > > > > > > http://www.w3.org/TR/html4/loose.dtd";> > > > http://wicket.apache.org";> > > > > > > > > > > /> > > > > > > > > > > > > > > > > > > - > > > - > > > > > > > > > > > > href="theme/pageBlocking.css"> > > > href="Calendar/css/jscal2.css" > > /> > > > > > href="Calendar/css/border-radius.css" /> > > > > > href="Calendar/css/steel/steel.css" /> > > > > > > > > > > > > > > src="javascripts/pageBlocking.js"> > > > > > src="javascripts/aim-hrs-autocomplete.js"> > > > > > > > > > > > > > > > > > > > src="jspspellcheck/spellcheck-caller.js"> > > > > > > > > > > > > > > >//credit: http://psacake.com/web/js.asp > > >function imposeMaxLength(Object, evt, MaxLen) { > > >var e = window.event ? event.keyCode : evt.which > > >if (e == 8 || e == 46 || (e >= 37 && e <= 40)) return true; > > > //bs, del, arrows > > >return (Object.value.length <= MaxLen); > > >} > > > > > > > > > > > > > > > > > >div.wicket-aa { > > >font-family: sans-serif; > > >font-size: 12px; > > >background-color: white; > > >border-width: 2px; > > >border-color: gray; > > >border-style: solid; > > >padding: 2px; > > >margin: 1px 0 0 0; > > >text-align: left; > > >width: 120px; > > >} > > > > > >div.wicket-aa ul { > > >list-style: none; > > >padding: 2px; > > >margin: 0; > > >width: 100px; > > >} > > > > > >div.wicket-aa ul li.selected { > > >background-color: #DEEFF7; > > >padding: 2px; > > >margin: 0; > > >width: 100px; > > >} > > > > > >div.imxt-vista tr.imxt-grid-row:hover td.imxt-cell, > > >div.imxt-vista tr.imxt-grid-row:hover td.imxt-sorted {} > > > > > > > > > > > > > > > > > > > > > *Java Code:* > > > > > > > > > > > > String timeout= "175"; > > > if(AppSession.getObjAimShell() != null && > > > AppSession.getObjAimShell().getTimeoutLimit() !=null) > > > timeout = "" + ((AppSession.getObjAimShell().getTimeoutLimit() * > > 0.9)*1000); > > > final Model sessionTimeoutInterval = new > Model(timeout); > > > HiddenField sessionTimeoutIntervalField = new > > > HiddenField("sessionTimeoutInterval", sessionTimeoutInterval) ; > > > sessionTimeoutIntervalField.setOutputMarkupId(true); > > > sessionTimeoutIntervalField.setMarkupId("sessionTimeoutInterval"); > > > add(sessionTimeoutIntervalField); > > > > > > > > > *Java Script:* > > > var sessionPingTime = 175; > > > var sessionTimerId = null; > > > > > > function resetSessionTimer() { > > > try{ > > > if(document.getElementById('sessionTimeoutInterval')) { > > > sessionPingTime = document.getElementById('sessionTimeoutInterval'). > > value; > > > } > > > if(parent) { > > > parent.clearTimeout(parent.sessionTimerId); > > > parent.sessionTimerId = null; > > > parent.sessionTimerId = parent.setTimeout("windowCloseSignOff();", > > > sessionPingTime); > > > }else { > > > clearTimeout(parent.sessionTimerId); > > > sessionTimerId = null; > > > sessionTimerId = setTimeout("windowCloseSignOff();", sessionPingTime); > > > } > > > }catch(c){showScriptError(c, 'resetSessionTimer');} > > > } > > > > > >
Re: ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes
Thank you martin! Let me try this. On Wed, Aug 31, 2016 at 2:27 PM, Martin Grigorov wrote: > Hi, > > Put a breakpoint at RequestCycle#setResponsePage(Class, PageParameters) > and > see who and why is calling it. This will tell you the reason. > If this doesn't help then put breakpoints in > RestartReponseAtInterceptPageException constructors. > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Wed, Aug 31, 2016 at 5:06 PM, durairaj t > wrote: > > > I got the same issue in Wicket 1.5, so I migrated it to 6.23, but still > it > > is happening. > > > > Moreover, I used "*Session.get().replaceSession()**;*" just to reproduce > > the issue. it will not be in the actual application code. > > > > and I just used "* WebSession.get().clear(); *, *Session.get().clear(); > , * > > *WebSession.get().**replaceSession()*" to reproduce the issue. they are > > also loading login page as it is happening in the application. > > > > I don't know the exact code or component or reason for this issue. > > > > > > On Wed, Aug 31, 2016 at 10:51 AM, Francois Meillet < > > francois.meil...@gmail.com> wrote: > > > > > Javadoc from Session # replaceSession() says : Call() upon login to > > > protect against session fixation. > > > > > > Until Wicket version 6.21 the destroy method did not set the session id > > to > > > null. > > > In 6.23, Session # destroy() set session#id to null, this is why Login > > > Page is loaded. > > > > > > Hope this helps > > > > > > François > > > > > > > > > > > > > Le 31 août 2016 à 16:21, durairaj t a > écrit : > > > > > > > > Thank you for your quick response. > > > > > > > > *Session:* 30 minutes. > > > > > > > > *Html Header:* > > > > > > > > > > > http://www.w3.org/TR/html4/loose.dtd";> > > > > http://wicket.apache.org";> > > > > > > > > > > > > type="image/ico" > > > /> > > > > > > > > > > > > > > > > > > > > > > > > - > > > > - > > > > > > > > > > > > > > > > > href="theme/pageBlocking.css"> > > > > > href="Calendar/css/jscal2.css" > > > /> > > > > > > > href="Calendar/css/border-radius.css" /> > > > > rel="stylesheet" > > > > href="Calendar/css/steel/steel.css" /> > > > > > > > > > > > > > > > > > > > src="javascripts/pageBlocking.js"> > > > > > > > src="javascripts/aim-hrs-autocomplete.js"> > > > > > > > > > > > > > > > > script> > > > >