struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Navjot Singh" <navjo...@net4india.net>
Subject RE: need suggestion on logic
Date Mon, 28 Jul 2003 14:51:48 GMT
very simple. say user fills in text field and press enter.

1. Pass the control to an action "Checker".
2. Checker will verify if the process needs login.
3. If NOT, case is clear.
4. If YES,
   + Store the request state variables in some object.
   + Save that object in Session.
   + Pass Control to "Ask Password" page.
   + "Passwd Manager" checks if pass is OK?
      + If NOT re-display the "Ask Password".
      + If YES,
        - save pass state for Checker's sake.
        - retrieve the request state variables.
        - Dispatch a request to checker again.
          This case will be treated same as 2,3 steps.

Checker can be implemented either using
+ Filter OR
+ Some method in Base Action
+ extend request controller.

See what suits you.
-Navjot Singh

PS - If all you are looking for is general login system. See CMA/Realm
Security.


|-----Original Message-----
|From: Ashish Kulkarni [mailto:kulkarni_ash1312@yahoo.com]
|Sent: Monday, July 28, 2003 8:03 PM
|To: struts-user@jakarta.apache.org
|Subject: need suggestion on logic
|
|
| Hi,
| I am building a web application using struts1.1, and
| this is my requirement,
| There is a jsp where in user will enter data in text
| field, and then press enter, this will submit to a
| Action class, this action class must decide wether a
| relogin page has to be displayed or not, and if yes
| then display a relogin page, the user will enter the
| password, if the password is correct, perform the
| task  of entering data in database, if the password
|is
| wrong  or user presses cancel, then take him back to
|   the jsp from where the user came, and populate all
|the data which was entered in jsp,
| If there is no need for relogin screen, enter the
| data to  database.
| the puzzle here is how do i write that common Action
| class which will handle to display the login page,
| and
| other Action class which will validate the password,
| and forward the request to other class
| So i need to remmember where the request came from
| and
| where it has to go??
| need help on this
|
| Ashish
|
|
|
|__________________________________
|Do you Yahoo!?
|Yahoo! SiteBuilder - Free, easy-to-use web site design software
|http://sitebuilder.yahoo.com
|
|---------------------------------------------------------------------
|To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
|For additional commands, e-mail: struts-user-help@jakarta.apache.org
|
|


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message