Hopefully this is an easy one for someone to answer. I'm simply trying to
set up an action-mapping that performs a redirect instead of a forward.
If I use the following xml in struts-config.xml (I'm using
**struts-faces**), then everything "works":

<action
  path="/search"
  type="com.wheels.struts.SearchAction"
  name="searchForm"
  scope="request"
  input="search">
  <forward
    name="results"
    path="faces/results.jsp"
  />
</action>

I get an error if I change the forward to be a redirect, however, as in:


<action
  path="/search"
  type="com.wheels.struts.SearchAction"
  name="searchForm"
  scope="request"
  input="search">
  <forward
    name="results"
    path="faces/results.jsp"
    redirect="true"
  />
</action>

The error I get is:

java.lang.IllegalStateException: Cannot forward after response has been
committed

Any thoughts on this one? Is there something I need to change in my
Action class to properly redirect instead of forward? Something in
struts-config.xml??  I read earlier posts about creating an
ActionRedirect subclass of ActionForward, but it seems like this should
not be necessary.  Keep in mind I'm using struts-faces -- not sure if
that makes a difference.

Thanks very much.

-Adam
-- 
  Adam Fisk
  [EMAIL PROTECTED]

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

Reply via email to