未定义mojarra [英] mojarra is not defined
问题描述
我正在用mojarra开发JSF应用程序.
I'm developing JSF application with mojarra.
我收到javascript错误未定义mojarra".
I'm getting javascript error "mojarra is not defined".
部署完毕后,ajax调用即可正常工作. 但是刷新页面后,会出现错误.
After deploy everything is ok, ajax call works properly. But after refreshing page, error appears.
刷新后,head标签中缺少javascript包含.
There is lack of javascript include in head tag after refreshing.
工作似乎很喜怒无常.
我在Tomcat和Glassfish上的行为相同,Mojarra在2.0.3版中.
Same behavior I have on Tomcat and Glassfish, Mojarra is in version 2.0.3.
推荐答案
出现此错误的原因之一是使用<head>..</head>
和<body>...</body>
标记而不是<h:head>...</h:head>
和<h:body>...</h:body>
.
One of the reason this error can appear is by using <head>..</head>
and <body>...</body>
tags instead of <h:head>...</h:head>
and <h:body>...</h:body>
.
命名空间-xmlns:h="http://java.sun.com/jsf/html"
这篇关于未定义mojarra的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!