If a <form> requires authentication, don't render it until the 
user is logged in.

If you are worried about the user's session timing out before 
the form is submitted, implement some sort of javascript timer
that (after a period equal to a session timeout), pops up a 
modal login form.  Successfully submitting the login form 
Resets the timer, makes the login form disappear, and 
the user is free to submit their form.




> -----Original Message-----
> From: Sanjaya Kumar Patel [mailto:skpate...@hotmail.com] 
> Sent: Friday, November 13, 2009 3:48 PM
> To: Struts User Group
> Subject: RE: How to get Login page while submitting a data form
> 
> 
> Hi Pawel, Thanks for the insight. I would give a try.
> 
> 
> Being a common scenario, is there any existing work already 
> present for
> this, so that I don't have to reinvent the wheel? I guess there should
> already be some established library / code sample which people follow.
> What do people normally do?
> 
> > when intercepting action for the first time (no logged user),
> > You can save submited data along with request uri and put it into
> > session/database
> > then after login (inside login action), check if these informations
> > are present in sesion/database
> > and forward to desired action with all the params that You have
> > collected before login.
> 
> 
> > > My requirement is this:
> > >
> > > 1. User fills a form and submits.
> > > 2. If he has not logged in, login form comes up.
> > > 3. after logging in, the data automatically gets 
> submitted and next page comes.
> > >
> > > I am new to struts and unable to figure out the natural 
> solution, even after a lot of googling. As I understand step 
> 2 should be easy using interceptor, but how to get step 3 work?
> > >
> > > I am using struts 2.1.8.
> 
>                                         
> _________________________________________________________________
> New Windows 7: Find the right PC for you. Learn more.
> http://windows.microsoft.com/shop
> 
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates Direct contact information for 
affiliates is available at http://www.merck.com/contact/contacts.html) that may 
be confidential, proprietary copyrighted and/or legally privileged. It is 
intended solely for the use of the individual or entity named on this message. 
If you are not the intended recipient, and have received this message in error, 
please notify us immediately by reply e-mail and then delete it from your 
system.


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

Reply via email to