thanks a lot! the problem is the Visit object. Do you think is it possible solve problem set Visit Object to null?
Or, how can i redirect on session time out th application on login page? Thnaks in advance eckobar wrote: > > in the example > http://svn.apache.org/viewvc/tapestry/tapestry4/tags/4.1.1/tapestry-examples/Vlib/src/java/org/apache/tapestry/vlib/VlibPage.java?revision=488094&view=markup > you could see, that everytime before a state is injected with > @InjectState("visit") the @InjectStateFlag("visit") method is called to > ensure that state-object is present or not. > > hope i could help! > > diego galdi wrote: >> Hi, >> I hava a problem with session time out. >> I have a login page with username and password. >> On submit I invoke a methos that takes care of authentication. >> If I use invalid username or password, first time I'm redirect to my >> login page, >> and this is what I want, but second time I input wrong username or >> password, I don't see login page but tapestry error page with message >> 'Your session has timed out'. >> This is my code: >> >> >> 1) Home.html >> >> <form jwcid="loginForm"> <form jwcid="loginForm"> >> >> <form jwcid="loginForm"> <form jwcid="loginForm"> >> >> <input type="text" jwcid="@TextField" value="ognl:userName"/> >> >> <input type="password" jwcid="@TextField" value="ognl:password" >> hidden="ognl:true" /><input type="password" jwcid="@TextField" >> value="ognl:password" hidden="ognl:true" /> >> >> </form></form> >> >> >> >> 2) Home.page >> >> <page-specification class="myPackage.Login"> >> >> <property-specification name="message" type="java.lang.String"/> >> >> <property-specification name="userName" type="java.lang.String"/> >> >> <property-specification name="password" type="java.lang.String"/> >> >> <component id="loginForm" type="Form"> >> >> <binding name="listener" expression="listeners.onFormSubmit" /> >> >> </component> >> >> </page-specification> >> >> >> >> 3) Login.java (extends extends BasePage implements PageRenderListener) >> >> public void pageBeginRender(PageEvent arg0) { >> daoManager = PersistenceUtils.getInstance(); >> } >> >> public void onFormSubmit(IRequestCycle cycle) { void >> onFormSubmit(IRequestCycle cycle) { >> >> tr{ >> >> MyVisit visit = (MyVisit) getVisit(); >> >> ... >> >> // Verify username and password and redirect to my Welcome Page >> >> } catch(Exception) { >> >> throw new PageRedirectException("Home"); >> >> } >> } >> >> I notice that second time I submit form my pageBeginRender is not called. >> >> Any ideas? >> >> Thanks a lot in advance >> >> --------------------------------------------------------------------- >> 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/Stale-session-problem-tf4117403.html#a11741608 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]