You must specify the value attribute or nested tag

问题:18:45:28,477 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: You must specify the value attribute or nested tag content
        at org.apache.struts.taglib.html.MultiboxTag.prepareValue(MultiboxTag.java:195)
        at org.apache.struts.taglib.html.MultiboxTag.doEndTag(MultiboxTag.java:162)
解决:
     这个错误是由于<html:multibox这个标签空所致
<html:multibox property="kk_CheckBox">  
       <bean:write name="element" property="idbmqx" />  
      </html:multibox>  

如果idbmqx为空,那么就会报异常的,解决办法就是不要让multibox 为空,或者用<c:if控制一下,为空就不执行
<logic:notEmpty name="element" property="idbmqx">  
      <html:multibox property="kk_BlacklistVehicle_UserManage_BMQX_SC_CheckBox">  
       <bean:write name="element" property="idbmqx" />  
      </html:multibox>  
     </logic:notEmpty>  

<logic:notEmpty 非空判断,不为空时才执行标签体里的内容

你可能感兴趣的:(java,apache,jsp,struts,servlet)