Hi,
I am building a content upload application using JSPs - I seem to get stuck at one point.
The scenario is like this - There is a
JSP page, page A that has a form. Here the user enters some data that he wants to upload to a site. On clicking submit, page A does some validations and forwards to page B. Page B has a link, on clicking this, the user can preview the uploaded data. If he does not like what he sees, page B has a Return link. This should take him back to page A with all the data he entered intact. I am using a Bean that has all the form values, and it is in request scope, so I need to be able to forward to Page A on clicking the return link/button.
I tried to explicitly set the bean in the request, but what happens is on clicking the link, it seems to be a new request entirely. I want to somehow use the same request object when I click this link.
I also tried calling a javascript function on clicking the link, and forwarding inside the function, but then the forward seems to get executed the first time itself, so that page B is never displayed.
Using the bean in session scope is not ok, since I do not want the form data to be valid for the entire browser session, only for the request.
My guess is that there is something simple here that I am missing. Can someone please point me in the right direction?
Thanks so much,
Sindhu