You won't be able to re-compose the request object as if it was just
submitted.  The quickest, dirtiest way is to just stow the form params
in the session upfront and then use them from the session later.

Example:

<c:if test="${not empty param.mySubmitBtn}">
  <c:set var="mySessProp" scope="session" value="${param.myFormField}" />
  <c:set var="mySessProp2" scope="session" value="${param.myFormField2}" />
  <!-- Keep going though all the form fields you want to save. -->
</c:if>

<p>Your request for ${SessProp} follows:</p>
.....

--David

David Kerber wrote:

> David Smith wrote:
>
>> So you want to effectively save the parameters from the original
>> request to page 1 and then use them when you come back to page 1.  I
>> can see two options:
>>
>> 1. Sessionless -- each page propogates the original params as hidden
>> fields until you return to page 1 where it makes use of them.
>> 2. With sessions -- the original params are stored in the session and
>> page 1 uses them in the absence of form params -- ie when completing
>> the process.
>
>
> I've been trying to do this with sessions, but can't figure out the
> details:. I can handle extracting the original params and storing them
> away no problem, but can't figure out how to build the request again
> and re-initiate it, to bring that page up again.  Can you give me an
> example or a link?  I've tried quite a bit of googling, but must not
> have hit upon the right combination of terms yet.
>
> Dave
>
>>
>> --David
>>
>> David Kerber wrote:
>>
>>> Ok, I'll try:
>>>
>>> My app is started with a .jsp.  On it the user enters a location
>>> ID.  When they click the submit button, it sends the request to a
>>> servlet (call it page 1)  which brings up information from a
>>> database about that location, and gives them the option to make
>>> changes to the information for the location, stepping through 3 more
>>> pages, all from servlets.  After the last page is done, I want to
>>> return to the first servlet page (page 1) with the same request
>>> parameters as it was originally requested with, so that the site
>>> information is re-requested from the database, and they will then
>>> see the same site, but with the data changed to reflect what they
>>> just entered.
>>>
>>> All of this works right now, except that I haven't figured out how
>>> to return to servlet page 1 with the same request parameters it had
>>> the first time, *as if* it had been requested from the jsp, but
>>> without them needing to re-enter the location ID and clicking on the
>>> submit button again.  How can I do that?
>>>
>>> Thanks for any suggestions!
>>> Dave
>>>
>>>
>>> Hassan Schroeder wrote:
>>>
>>>> On 12/21/06, David Kerber <[EMAIL PROTECTED]> wrote:
>>>>
>>>>> Nobody has a suggestion about this?
>>>>
>>>>
>>>>
>>>>
>>>> Sure. I suggest you rephrase what you're actually trying to
>>>> accomplish,
>>>> because the original made utterly no sense to me :-)
>>>>
>>>> FWIW,
>>>
>>>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to