struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: output xml
Date Tue, 16 Sep 2003 12:13:20 GMT
That works for me. I do it in the action. Neither tomcat nor struts 
overwrite it. The default for struts is set as a parameter to the 
controller in struts-config.xml, but setting that header overwrites it.

Perhaps if you are setting it after the response has started, it is too 
late.

Adam

On 09/16/2003 10:12 AM Morten Andersen wrote:
> Is it possible to output xml from a struts application without using xls 
> transformations?
> 
> How is this done?
> 
> What I need is something, that makes it possible for the browser to see, 
> that it is a xml document and not a html document that it is reading. 
> (Content-type setting)
> I have tryed:
>    response.setHeader("Content-Type","text/xml");
> But without any luck.
> Is this being overwritten by Struts or perhaps Tomcat?
> 
> Thanks
> 
> 
> Morten Andersen
> Master of applied mathematics and computer science
> Research assistant (in e-learning)
> 
> The Maersk Institute of Production technology at Southern Danish 
> University www.mip.sdu.dk
> Campusvej 55
> DK-5230 Odense M
> Denmark
> +45 6550-3654
> Jabber id: hat@jabber.dk
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 

-- 
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9


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


Mime
View raw message