Frank W. Zammetti wrote:
Xavier Vanderstukken wrote:

IS that class really performs a redirect request?
Can I use the setForward method to false to performs a forward with parameters?

Interesting question... someone can correct me if I'm wrong, but I believe the answer is no. Well, to be more precise, you *may* be able tp setForward(false) to do a forward, I do not know for sure, but you won't be able to add parameters.

Up to and including servlet spec 2.4, there is no addParameter() method of HttpServletRequest, or any superclass. Since when you do a forward you are passing the same request along, you would need this method to add parameters.

When you do a redirect however, the URL you redirect to includes the parameters as a query string.

So, no, I do not believe it is ever possible, with ActionForward or not, to add parameters when doing a forward, only when doing a redirect.

I believe Frank's basically correct. However (and note, I have *not* tried this) I think you might be able to do something like this:

    ActionForward fwd = new ActionForward(
        mapping.findForward("showSavedItem.do"));
    fwd.setPath(fwd.getPath() + "?itemId=" + itemId);
    return fwd;

Like I say, I haven't tried it so your mileage may vary...

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to