DocType is not showing in the rendered output from JSF

本秂侑毒 提交于 2019-12-08 04:28:15

问题


I am trying into integrate JSF1.2, Richfaces 3.3.0 GA, Facelets1.1 and JQuery. The issue i am facing is the rendered output is starting from i.e its missing the Doc type and HTML Tag.

For example

   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"><ui:composition>
<head>  </head> <body>  kkkkkkkkkkkkkkkkk   </body> </ui:composition></html>

and the rendered output is


<head> <script src="/wmat/a4j/g/3_3_0.GA/org/ajax4jsf/framework.pack.js.faces" type="text/javascript"></script><script src="/wmat/a4j/g/3_3_0.GA/org/richfaces/ui.pack.js.faces" type="text/javascript"></script><link class="component" href="/wmat/a4j/s/3_3_0.GAorg/richfaces/renderkit/html/css/basic_both.xcss/DATB/eAFrvajdHLp8hjQAEgwDtA__.faces" rel="stylesheet" type="text/css" /><link class="component" href="/wmat/a4j/s/3_3_0.GAorg/richfaces/renderkit/html/css/extended_both.xcss/DATB/eAFrvajdHLp8hjQAEgwDtA__.faces" media="rich-extended-skinning" rel="stylesheet" type="text/css" /><link class="component" href="/wmat/a4j/s/3_3_0.GA/org/richfaces/skin.xcss/DATB/eAFrvajdHLp8hjQAEgwDtA__.faces" rel="stylesheet" type="text/css" /><script type="text/javascript">window.RICH_FACES_EXTENDED_SKINNING_ON=true;</script></head> <body> kkkkkkkkkkkkkkkkk</body></html>

I dont know why its not showing the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> Tags in the rendered output.

Jquery Components are not working because of this issue.

Can anybody please help me to sort it out? Not sure what I am missing in this

In the ice face forum i can see the same issue reported but iceface provides a direct solution for this. Please check this link for more details

Thanks in Advance
Jobin


回答1:


Get rid of those <ui:composition> tags, they do not belong in the "master template". They belong in the include template files. When used in include files, only their content will be parsed and everything outside those tags will be ignored, which is what you're now seeing.



来源:https://stackoverflow.com/questions/4763313/doctype-is-not-showing-in-the-rendered-output-from-jsf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!