keep the data in the form in session??

M

Matt

I have MyForm.jsp for the form, and MyAction.jsp that process the
request.
MyAction.jsp will interact with another system, if it fails, then it
will show MyForm.jsp with the data entered by the user again.
Everything is in the same browser.

In my case, should I keep the data in the session, so that it can go
back? Maybe I should
use <jsp:forward> tag also?
 
T

Tim Jowers

I have MyForm.jsp for the form, and MyAction.jsp that process the
request.
MyAction.jsp will interact with another system, if it fails, then it
will show MyForm.jsp with the data entered by the user again.
Everything is in the same browser.

In my case, should I keep the data in the session, so that it can go
back? Maybe I should
use <jsp:forward> tag also?

Another group on JSP I think.
<jsp:forward> and request.setAttribute or something to signify the
error?
So, MyForm.jsp checks for the error and pastes the data back in for
editing. setAttribute to pass dat along versus getParameter to get
form fields.

If you stick it in session then MyForm.jsp has to pull it back out.
Extra work to clean up.
 

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,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top