简体   繁体   English

mojarra 未定义

[英]mojarra is not defined

I'm developing JSF application with mojarra.我正在用 mojarra 开发 JSF 应用程序。

I'm getting javascript error "mojarra is not defined".我收到 javascript 错误“未定义 mojarra”。

After deploy everything is ok, ajax call works properly.部署后一切正常,ajax 调用正常。 But after refreshing page, error appears.但是刷新页面后,出现错误。

There is lack of javascript include in head tag after refreshing.刷新后head标签中缺少javascript include。

It seems to be working very moody.它似乎非常喜怒无常。

Same behavior I have on Tomcat and Glassfish, Mojarra is in version 2.0.3.我在 Tomcat 和 Glassfish 上的行为相同,Mojarra 的版本为 2.0.3。

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> .出现此错误的原因之一是使用<head>..</head><body>...</body>标记而不是<h:head>...</h:head><h:body>...</h:body>

Namespace - xmlns:h="http://java.sun.com/jsf/html"命名空间 - xmlns:h="http://java.sun.com/jsf/html"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM