Hi,
Create a subclass of the request processor and override either the
processRoles() or the processPreprocess() methods. You can check if the
session attribute exists here and you won't need to duplicate code in
each action.
Gareth
Abhimanyu Koul wrote:
but the problem with that approach would be that i would have to write same
code for every action or call the same method for each action. i want that
it should be automatically done for each action at the requestprocessor
level so that every developer doesn't have to worry about it. ?
Regards,
Abhimanyu Koul
FinEng Solutions (P) Ltd.
Mobile : +91 9819510090
----- Original Message -----
From: "Mukta" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <user@struts.apache.org>
Sent: Monday, June 12, 2006 3:28 PM
Subject: RE: sessions
If you have some session attributes in your application, then it is very
easy to do so. Whenever a user directly tries to access any action, first
try to get that session attribute. If it is null, redirect to login page.
-----Original Message-----
From: Abhimanyu Koul [mailto:[EMAIL PROTECTED]
Sent: Monday, June 12, 2006 3:16 PM
To: Struts Mailing list
Subject: sessions
hi all!
i want to use session validation in my application. no user should be
allowed to view any page without logging in. if any user say copies the
action from the properties window into the address bar of the browser, he
should be directed to the login page. no error message should be shown
neither the user should be allowed to do some operations without logging
in.
can we use some feature of requestprocessor for that. what are the various
methods to achieve that.
regards
Abhimanyu Koul
FinEng Solutions (P) Ltd.
Dani Compound,
158, Vidyanagari Marg,
Kalina, Santacruz (East),
Mumbai - 400 098
Mobile : +91 9819510090
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]