On Thu, 19 Apr 2001, [iso-8859-1] Gunnar Bostr�m wrote:

> Newbie question.
> Is the form parameter in the perform method meant to be used both for input
> values and output values (from the Action)?
> 

The form parameter's primary purpose is input, but you can use it for
output as well under the following circumstances:
* You are forwarding (and not redirecting) to the next page
  if the form bean is in request scope.
* The page you forward to expects the bean under the same key
  (and in the same scope) that you have declared it in struts-config.xml.
* The output you want to accomplish can be done by simply modifying
  properties of the form bean.

> If not how do I specify the output form?
> 

The other way to "output" information from an Action is to simply store an
attribute under some key that is used in the destination page -- typically
either by calling request.setAttribute() or session.setAttribute().


> :-)
> 
> 
> 

Craig


Reply via email to