DocType没有显示在JSF的渲染输出中 [英] DocType is not showing in the rendered output from JSF

查看:66
本文介绍了DocType没有显示在JSF的渲染输出中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试集成JSF1.2,Richfaces 3.3.0 GA,Facelets1.1和JQuery.我面临的问题是呈现的输出是从其开始的,即它缺少Doc类型和HTML标记.

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.

例如

   <!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>

渲染的输出是

<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>

我不知道为什么它在渲染的输出中没有显示<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <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组件无法正常工作.

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

在ice face论坛上,我可以看到相同的问题,但是iceface为此提供了直接的解决方案.请查看 链接以获取更多详细信息

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

推荐答案

摆脱那些<ui:composition>标记,它们不属于主模板".它们属于包含模板文件.在包含文件中使用时,将仅解析其内容,而忽略这些标记之外的所有内容,这就是您现在所看到的.

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.

这篇关于DocType没有显示在JSF的渲染输出中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆