I just implemented servletResponseAware as well.
Thanks!

On Thu, Jun 11, 2009 at 11:59 AM, Wes Wannemacher <w...@wantii.com> wrote:

> On Thu, Jun 11, 2009 at 11:53 AM, Bhaarat Sharma<bhaara...@gmail.com>
> wrote:
> > This might be too simple ...but how will i get the outputstream?
> > lets say I have something like this
> >
> > if (addNewQuestion () == 1)
> > {
> >                String numQsAdded = "<div
> > id='message1'>"+getQuestion().substring(1,
> getQuestion().length())+"</div>";
> >                //I want to put numQsAdded into a outputstream
> >                return NONE;
> >  }
> >
> >
> > my action is implementing ServletRequestAware so I have access to
> > the HttpServletRequest request
> >
>
>
> The OutputStream usually comes from the response (since you are
> responding). I think you might be able to pull the ServletResponse out
> of the ActionContext if you don't want to implement the interfaces.
>
> -Wes
>
>
>
> --
> Wes Wannemacher
> Author - Struts 2 In Practice
> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> http://www.manning.com/wannemacher
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to