I would like to return a well-formed XML document when a user clicks on a specific link in my JSF2 application.
当用户点击我的JSF2应用程序中的特定链接时,我想返回格式良好的XML文档。
I have the link working which goes to an xhtml page - however I cannot get the page to return XML to the browser. Eventually the XML will be generated by a backing bean (pulling the data from the DB). But first I am trying to get a simple demo working with hardcoded data in the page.
我有链接工作到xhtml页面 - 但是我无法获取页面将XML返回到浏览器。最终,XML将由辅助bean生成(从数据库中提取数据)。但首先我要尝试使用页面中的硬编码数据进行简单的演示。
At the moment the page always returns wrapped in
目前页面始终返回包装
<html> ... </html>.
1 个解决方案
#1
1
How about using REST web services? Check out the quick tutorial at: http://seamframework.org/Documentation/CDIQuickstartForMavenUsers to see how to get simple example with REST functionality.
如何使用REST Web服务?查看快速教程:http://seamframework.org/Documentation/CDIQuickstartForMavenUsers,了解如何使用REST功能获取简单示例。
#1
1
How about using REST web services? Check out the quick tutorial at: http://seamframework.org/Documentation/CDIQuickstartForMavenUsers to see how to get simple example with REST functionality.
如何使用REST Web服务?查看快速教程:http://seamframework.org/Documentation/CDIQuickstartForMavenUsers,了解如何使用REST功能获取简单示例。