Hello again,

hmmmmmmm... Hopefully, I did not ask a too silly thing. I try again.

I'am not sure, if I use request parameters correctly. Like I use them, I
would need to manipulate the request (removing some parameters) before
forwarding occures.

I use request parameters to specify required actions. I use them in forms
(form actions and the form button names) and in usual hyperlinks. Lets
assume a hyperlink:

jsp page something.jsp:
...
<html:link page="/something.do?action=next">
...

SomethingAction's perform method:
// ...
// check for errors
// ...
// change underlying model. (retrieve next record)
// ...
// forward to original jsp.page and display the changed model
return (new ActionForward(mapping.getInput()));

Until now everything works fine, but the original request url is still
valid. Pushing the reload button of the browser causes a "next" action
again. It should cause a simple reload.

Could someone tell me, what I do wrong?

Thank You,
Stefan

--
Stefan Seidel

----- Original Message -----
From: "Stefan Seidel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 1:47 PM
Subject: removing request parameters before action forward


> Hello to all,
>
> I don't know how to remove request parameters just before leaving a
> perform(...) method.
>
> 1) Is this a bad practice or wrong design?
> 2) if not, how can I do this?
>
> What I'am trying to do:
>
> A jsp page displays some items. If one clicks an item, the same page shows
> again with an incremented item count.
>
> The <html:link...>-tag includes the item id as an url parameter. The
perform
> method of the action class looks for this url parameter, increments the
> corresponding item count in the action form and forwards back to the jsp
> page.
>
> Everything works fine, but the url parameter (the complete url) is also
> forwarded to the jsp page. Sometimes this doesn't matter (or even should
be
> like that), but in this case, pushing the reload button increments the
item
> count again.
>
> Could anyone give me a hint or even a solution?
>
> Thank You
> Stefan
>
> PS: I feel this was asked before, but I could not locate similar questions
> in the archive. Sorry.
>
> --
> Stefan Seidel
>

Reply via email to