R
Rico
Here's the scenario:
We have a JSP page that takes user's input to produce a document.
The user would need to upload an attachment for the document.
The upload is performed by a servlet, which causes us to leave the current
page of input. But we want to preserve the data the user has already input
in the textfields.
So, we're looking at using the session scope. What is the best way to save
the values already input to a session Object before calling the upload
servlet?
I'm thinking most parameters on the JSP page have no business being in the
upload servlet and it'd be messy to get it to save said parameters.
I'm just wondering whether I'd be reinventing the wheel, or have the wrong
conception, because preserving state is a 'standard' aspect of web
programming. My idea is to have a dedicated helper servlet that would
perform this task of saving the parameters already input to the session
Object before redirecting us to the upload page.
Is there a simpler way?
Rico.
We have a JSP page that takes user's input to produce a document.
The user would need to upload an attachment for the document.
The upload is performed by a servlet, which causes us to leave the current
page of input. But we want to preserve the data the user has already input
in the textfields.
So, we're looking at using the session scope. What is the best way to save
the values already input to a session Object before calling the upload
servlet?
I'm thinking most parameters on the JSP page have no business being in the
upload servlet and it'd be messy to get it to save said parameters.
I'm just wondering whether I'd be reinventing the wheel, or have the wrong
conception, because preserving state is a 'standard' aspect of web
programming. My idea is to have a dedicated helper servlet that would
perform this task of saving the parameters already input to the session
Object before redirecting us to the upload page.
Is there a simpler way?
Rico.