tomcat: form submission when not logged in

I

Ittay Dror

hi,

i have the following scenario:
1. a user has an open page, containing some form, and is not logged in
(his login expired).
2. he clicks submit
3. tomcat recognizes he is not logged in, and so handles it, by form
authentication, and forwards to login.jsp
4. the user fills in his details and clicks submit
5. tomcat authenticates the user and then forwards him to the original
destination
6. trying to handle the form submisssion (the original form), i see
there are no parameters in the request. (this is because the user had
to login at the middle)


is there a way of going through this scenario and have the original
form's parameters at the end?

thanx,
ittay
 
J

Jonck van der Kogel

i have the following scenario:
1. a user has an open page, containing some form, and is not logged in
(his login expired).
2. he clicks submit
3. tomcat recognizes he is not logged in, and so handles it, by form
authentication, and forwards to login.jsp
4. the user fills in his details and clicks submit
5. tomcat authenticates the user and then forwards him to the original
destination
6. trying to handle the form submisssion (the original form), i see
there are no parameters in the request. (this is because the user had
to login at the middle)


is there a way of going through this scenario and have the original
form's parameters at the end?

Yes, this is possible. When the user submits his form the parameters
are submitted as well. They are not used however, since you check
first whether or not the user's session has not expired. The trick
therefore is, to change your authentication code so that the
parameters that the user filled in (but were discarded) are read out
and saved to some temporary storage, as well as the page that this
occurred on. When the user then re-authenticates, you can
automatically take the user back to the page that he was last on and
fill in the parameters again.

Regards, Jonck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top