You can use: @Meta("tapestry.response-content-type=text/xml") on your page class. Although XML is not fully supported by tapestry at the moment. You may run into problems with invalid xml being generated if one of your elements matches an HTML element such as link or img which will render the opening tag, but will not close it. Also, I believe namespaces are stripped...
Josh On Nov 28, 2007 6:33 AM, Lars Kühne <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to use a tml template to serve an XML file that has dynamic > content (in fact, a Java Web Start JNLP file): > > <?xml version="1.0" encoding="utf-8"?> > <jnlp xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" > spec="1.5+" > ... > </jnlp> > > The content itself is rendered correctly, but I'm having problems > setting the correct content type for the response. > > What I tried is this: > > @Inject > private RequestGlobals requestGlobals; > > public void onActivate(String context) { > // ... initialize internal state from context > HttpServletResponse response = > requestGlobals.getHTTPServletResponse(); > response.setContentType("application/x-java-jnlp-file"); > } > > The response still comes out as text/html. > > How can I convince Tapestry that the content type should be > application/x-java-jnlp-file? > > Lars > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.