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: [EMAIL PROTECTED]



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



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


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



Reply via email to