JPractice

JSF+Spring+Hibernate+MySQL 开发商务平台实践

   :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  12 随笔 :: 0 文章 :: 20 评论 :: 0 Trackbacks
<h:outputLabel id="" value="#{category.name}" />

上面这行在用sun-ri的应用中不会报错
但在MyFaces中就会报错:
原因就出在id="" 去掉就会好了

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: empty expr
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
	org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
	com.bizcms.view.utils.SecurityFilter.doFilter(Unknown Source)

root cause

javax.faces.FacesException: empty expr
	org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
	org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:233)
	org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:219)
	org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
	org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
	com.bizcms.view.utils.SecurityFilter.doFilter(Unknown Source)
posted on 2006-02-18 23:55 JPractice 阅读(925) 评论(2)  编辑  收藏

评论

# re: SUN-RI和MyFaces的一点区别 2006-07-17 10:23 xuni
你好,我也遇到了和你上面的情况一样的错误,还没有解决。我用的也是MYFACES,不过我的页面代码好像和你的有一点不一样:
<h:form id="searchform">
<h:panelGrid columns="6">
<h:outputLabel value="标题" for="title"></h:outputLabel>
<h:inputText id="title" value="#{logBean.spTitle}"></h:inputText>

<h:outputLabel value="开始时间" for="beginTime"></h:outputLabel>
<h:inputText id="beginTime" value="#{logBean.spBeginTime}"></h:inputText>

<h:outputLabel value="结束时间" for="endTime"></h:outputLabel>
<h:inputText id="endTime" value="#{logBean.spEndTime}"></h:inputText>
</h:panelGrid>
<h:commandButton value="查询" action="#{logBean.findSelfWorkLog}"></h:commandButton>
</h:form>
如果你遇到了相同的问题,或是有解决和办法,告诉我一下好不好
xuni1411@163.com  回复  更多评论
  

# re: SUN-RI和MyFaces的一点区别 2006-07-17 10:47 xuni
解决了,就是类似id="" 和问题,标签
:)  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: