JSP页面报错:
javax.servlet.jsp.JspException: No bean found under attribute key talentSearch
at org.apache.struts.taglib.logic.CompareTagBase.condition(CompareTagBase.java:179)
at org.apache.struts.taglib.logic.EqualTag.condition(EqualTag.java:48)
at org.apache.struts.taglib.logic.ConditionalTagBase.doStartTag
<logic:equal value="1" name="talentSearch" property="talenttype">
<tb:gridColumn label="per.employee.name" bundle="staffing" property="name" dbsort="C_NAME" href="<%=url.toString() %>"/>
</logic:equal>
这个logic标签引起的,talentSearch为null,因此取数的时候报异常,这个时候需要在增加
<%
if(talentSearch != null){
%>
logic:equal value="1" name="talentSearch" property="talenttype">
<tb:gridColumn label="per.employee.name" bundle="staffing" property="name" dbsort="C_NAME" href="<%=url.toString() %>"/>
</logic:equal>
<%}%>
把标签放在里面。
分享到:
相关推荐
2. “No bean found under attribute key XXX” 这个错误通常发生在 Struts-config.xml 里定义了一个 ActionForm,但 type 属性指定的类不存在。解决方法是检查 Struts-config.xml 文件,确保 type 属性的值是 Form...
#### 一、No bean found under attribute key XXX **问题描述:** 在使用 Struts 框架时,如果遇到 `No bean found under attribute key XXX` 这类错误,通常意味着在 Struts 的配置文件 `struts-config.xml` 或者 ...
No bean found under attribute key XXX in struts-config.xml **错误描述**:当在Struts配置文件中未找到指定的ActionForm类型时,会抛出此异常。这通常意味着在`<form-beans>`元素下定义的ActionForm类不存在...
“No bean found under attribute key XXX” - **异常描述**:在 Struts 配置文件 `struts-config.xml` 中定义了一个 ActionForm,但 `type` 属性指定的类不存在或者在 Action 的定义中,`name` 或 `attribute` ...
#### 一、Nobean found under attribute key XXX 在 Struts 框架中,如果在请求作用域(request scope)中查找某个 ActionForm bean 时未找到,则会抛出此异常。这通常是因为在 `struts-config.xml` 文件中配置的 `...