You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by nobody22 <dg...@gmail.com> on 2007/07/09 12:37:43 UTC
session time out
Hi,
I'm using tapestry-3.0.4.
I have a logon page with username and password input fields.
First time I submit form it works fine.
If username and password are correct I go on to Welcome page, otherwise I'm
redirect on my logon page with an error message.
Second time i submit form, if I enter invalid username or password, I don't
see my logon page,
but I'm redirect to a page with message Your session has timed out.
Why tapestry see that session is timed out?
Here is my code:
Login.java
public abstract String getUserName();
public abstract String getPassword();
public abstract void setMessage(String message);
....
public void onFormSubmit(IRequestCycle cycle) {
MyVisit visit = (MyVisit) getVisit();
MyUserBean user = new MyUserBean();
if(my_Method_to_validate(getUserName(), getPassword())) {
visit.setUser(user);
cycle.activate("MainPage");
}
else
setMessage("invalid username or password");
}
Home.page
<page-specification class="it.mypackage.Login">
<description>add a description</description>
<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>
Home.html
<form action="" jwcid="loginForm">
<table>
<tr>
<th align="left">Utente:</th>
<td align="left">
<input type="text" jwcid="@TextField" value="ognl:userName" />
</td>
</tr>
<tr>
<th align="left">Password:</th>
<td align="left">
<input type="password" jwcid="@TextField" value="ognl:password"
hidden="ognl:true"/>
</td>
</tr>
<tr align="center">
<td colspan="2">
<input type="submit" value="Connetti" />
</td>
</tr>
</table>
</form>
Thanks a lot
--
View this message in context: http://www.nabble.com/session-time-out-tf4048284.html#a11498988
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org