then create a new result type handler class, add into struts.xml and use that 
to handle file creation.

 

i've not done it myself, but there are result types for handling jasper reports 
etc.. so can't be too involved.

 

adam
 
> Date: Fri, 5 Mar 2010 14:57:07 +0530
> Subject: Re: jsp out to a differnet outputstream
> From: abhishek.netj...@gmail.com
> To: user@struts.apache.org
> 
> Hi Adam,
> Thanks for replying, It is a file on server side,
> I could have written plain java code in JSP, but that will loose the benefit
> of jsp and also rework on my end, I am sure there must be a method to
> redirect the output of *out *to a file and not to STDOUT or so.
> 
> thanks
> abhi
> 
> On Fri, Mar 5, 2010 at 2:10 PM, adam pinder <apin...@hotmail.co.uk> wrote:
> 
> >
> >
> >
> > is it a file on the client side or server side ?
> >
> >
> >
> > if client side, you can specify a result type in the struts.xml but the
> > user will be prompted to save the file as its a security risk to write it
> > without there confirmation.
> >
> >
> >
> > server side, just use plain java code in jsp to write and then do a page
> > redirect or return null.
> >
> >
> >
> > adam
> >
> >
> >
> > > Date: Fri, 5 Mar 2010 12:52:33 +0530
> > > Subject: Re: jsp out to a differnet outputstream
> > > From: abhishek.netj...@gmail.com
> > > To: user@struts.apache.org
> > >
> > > On Fri, Mar 5, 2010 at 11:05 AM, Dale Newfield <d...@newfield.org>
> > wrote:
> > >
> > > > abhishek jain wrote:
> > > >
> > > >> I am not sure if it a direct struts question, if it is not pl pardon
> > me
> > > >> and
> > > >> let me know,
> > > >>
> > > >
> > > > Maybe a filter in your web.xml?
> > > >
> > > > How are your pages put together? tiles? sitemesh?
> > > > Since those are already filters, you might see if those can do what you
> > > > want...
> > > >
> > > Hi,
> > > I am using Tiles.
> > > Can tiles do the work for me?
> > > thanks
> > > abhi
> >
> > _________________________________________________________________
> > We want to hear all your funny, exciting and crazy Hotmail stories. Tell us
> > now
> > http://clk.atdmt.com/UKM/go/195013117/direct/01/
> >
> 
> 
> 
> -- 
> Thanks and kind Regards,
> Abhishek jain
> +91 9971376767
                                          
_________________________________________________________________
Send us your Hotmail stories and be featured in our newsletter
http://clk.atdmt.com/UKM/go/195013117/direct/01/

Reply via email to