Strange behaviour while running JSF “Hello World”

前端 未结 1 1695
说谎
说谎 2021-01-27 11:58

When running my JSF \"Hello World\" in server I get a File download message box which says \"do you want to save this file, or find a program online to open it\" which has three

相关标签:
1条回答
  • 2021-01-27 12:34

    MSIE does indeed not support the content type of application/xhtml+xml. The page should be served with a content type of text/html (you can verify that with HTTP/web developer tools). But that should already be done by default JSF/Facelets configuration. You don't seem to have overridden the content type anywhere in the given code. One of the ways is defining it using the contentType attribute of the <f:view> tag. Another way is calling HttpServletResponse#setContentType() in some web filter. Or, completely different, perhaps it's been done afterwards by the webserver itself or by some proxy in the line.

    0 讨论(0)
提交回复
热议问题