XML output from JSF2 using Facelets

I would like to return a well-formed XML document when the user clicks on a specific link in my JSF2 application.

I have a link that goes to the xhtml page - however, I cannot get the page to return the XML to the browser. Eventually, the XML will be generated using a bean (pulling data from the database). But first, I try to get a simple demo with hard-coded data on the page.

The moment the page always returns to

<html> ... </html>.
+3
source share

Source: https://habr.com/ru/post/1772524/


All Articles