You need to serve the XML file, itself--not forward to a JSP.  In your action 
class, one of the parameters is an HttpServletResponse instance.  Call 
addHeader() on that object.  Then copy the file contents to the OutputStream 
returned by getOutputStream() on that object.  Finally, the action class should 
return null, indicating that it has taken care of responding to the request.

 Hope that helps,
   George
   http://idiacomputing.com/

> -----Original Message-----
> From: Søren Blidorf [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, December 06, 2006 5:06 PM
> To: Struts Users Mailing List
> Subject: Re: file download without opening a window
> 
> 
> Thanks.
> 
> How can I add a header without opening a new window or redirect?
> 
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <user@struts.apache.org>
> Sent: Wednesday, December 06, 2006 11:02 PM
> Subject: RE: file download without opening a window
> 
> 
> add a header "Content-Disposition attachment; 
> filename=myFile.xml" using
> response.addHeader()
> 
> > -----Original Message-----
> > From: Søren Blidorf [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 06, 2006 4:56 PM
> > To: Struts Users Mailing List
> > Subject: OT: file download without opening a window
> >
> >
> > Does anybody know how to make a form button, that starts 
> downloading 
> > myFile.xml
> >
> > What I want is to make an onclick = "Save target as"
> >
> >
> > Med venlig hilsen
> >
> > Søren Blidorf
> > Nolas Consulting
> > Web:  http://www.nolas.dk
> > Mobil: +45 61676513
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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

Reply via email to