This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Selective Validation...  RSS feed

Ajay J Rao
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my application, I login and go to a main screen. Now I copy the URL and log out. When I paste the URL back again on the screen, I am getting the Login screen again, but with message "User name is required".

I just want the login screen w/o the message on the screen. How do I do this?

The code is something like this.

<action path="/validateUser"
type="com.action.login.LoginAction" name="LoginForm"
scope="request" validate="true" input="loginHome"
key="error.application.exception" path="loginException"
type="com.exception.ApplicationException" />
<exception key="error.general.exception"
path="exception" />
<forward name="success" path="/" />
<form name="LoginForm">
<field property="userName" depends="required">
<arg0 key="error.login.username.required" />
<field property="password" depends="required">
<arg0 key="error.login.password.required" />

The URL is like
[ August 06, 2008: Message edited by: Ajay J Rao ]
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd suggest that you specify redirect="true" on the forward. If you do so, the URI that the user sees after logging in will be:


Naturally there must be some mechanism either in each action or in a filter to verify whether a user is currently logged in or not and if not to redirect to the login page.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!