---
title: "You must specify the value attribute or nested tag"
author: "zhou_wu"
date: "2010-10-09T18:46:04Z"
tags: []
categories: ["企业架构"]
slug: "you-must-specify-the-value-attribute-or-nested-tag"
draft: false
lastmod: "2010-10-09T18:46:04Z"
id: 780096
url: "https://leesmart.iteye.com/blog/780096"
---

问题：18:45:28,477 ERROR ] 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

<html:multibox property="kk_CheckBox">  
       <bean:write name="element" property="idbmqx" />  
      </html:multibox>  

```

如果idbmqx为空，那么就会报异常的，解决办法就是不要让multibox 为空，或者用<c:if控制一下，为空就不执行

```html

<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 非空判断，不为空时才执行标签体里的内容