struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Pratt" <thechrispr...@gmail.com>
Subject Re: [S2] raw XML response
Date Tue, 28 Aug 2007 17:57:51 GMT
I don't specify anything at all, here's one of my actions:

    <action name="user-add" class="com.company.controller.UserAddAction"/>

  (*Chris*)


On 8/28/07, John Cartwright <John.C.Cartwright@noaa.gov> wrote:
> Thanks for your reply Chris.  Are you specifying a result type of
> "plaintext" in struts.xml or any <result> element at all?  I seem to be
> running into a situation where struts2 is trying to redirect me to a JSP
> w/ the same name as the action.
>
> Thanks again for your help!
>
> -- john
>
>
> Chris Pratt wrote:
> >> I'd like to simply return some text from a Action w/o redirecting to a
> >> page. I did this sort of thing in Struts1 by using the response's
> >> PrintWriter and returning null from the Action's execute method.
> >>
> >
> > You can do it exactly the way you did in Struts 1 (or mostly anyway).
> > If you implement ServletResponseAware you'll have access to the
> > HttpServletResponse and if you return null from the action the system
> > won't forward you anywhere.  I have several AJAX Actions that do
> > exactly this.
> >   (*Chris*)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message