JSF - xmlns:h无法识别? [英] JSF - xmlns:h not being recognized?

查看:183
本文介绍了JSF - xmlns:h无法识别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我项目的搜索XHTML部分中,h标签未被识别。我真的不知道为什么他们不工作。任何见解?这里是google代码上托管的xhtml文件的链接,因此可以查看整个项目。

In the "search" XHTML portion of my project, the "h" tags arent being recognized. I really have no clue why they aren't working. Any insight? Here's a link to the xhtml file hosted on google code so the entire project can be viewed.

https://code.google.com/p/xdsgui/source/browse/trunk/Frontend/WebContent/search.xhtml

谢谢。

推荐答案

他们应该由 FacesServlet 解析。如果它们在检索到的HTML输出中看起来未解析,那么它只是意味着根本没有调用 FacesServlet

They are supposed to be parsed by the FacesServlet. If they appear unparsed in the retrieved HTML output, then it simply means that the FacesServlet isn't been invoked at all.

您项目的 web.xml 表明它已经映射到 *。jsf 的网址格式。因此,如果您将浏览器地址栏中页面的请求网址中的 .xhtml 扩展名更改为 .jsf ,然后它会工作。

Your project's web.xml shows that it's been mapped on an URL pattern of *.jsf. So if you change the .xhtml extension in the request URL of the page in the browser's address bar to .jsf, then it'll work.

然而,最好只在<$ c的URL模式上映射 FacesServlet $ c> *。xhtml 直接。通过这种方式,您永远不需要摆弄虚拟URL,并且当有意将 .jsf 扩展名更改为<$ c时,最终用户也将永远无法看到原始JSF源代码。请求网址中的$ c> .xhtml 。

Better is however to just map the FacesServlet on an URL pattern of *.xhtml directly. This way you never need to fiddle with virtual URLs and the endusers will also never be able to see the raw JSF source code when they purposefully changes the .jsf extension to .xhtml in the request URL.

这篇关于JSF - xmlns:h无法识别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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