日期:2014-05-19  浏览次数:20718 次

Cannot find bean under name org.apache.struts.taglib.html.BEAN 问题,困扰了很久了
我的jsp页面代码如下:
<%@   page   language= "java "   pageEncoding= "UTF-8 "%>

<%@   taglib   uri= "/WEB-INF/struts-bean.tld "   prefix= "bean "   %>
<%@   taglib   uri= "/WEB-INF/struts-html.tld "   prefix= "html "   %>
<%@   taglib   uri= "/WEB-INF/struts-logic.tld "   prefix= "logic "   %>
<%@   taglib   uri= "/WEB-INF/struts-tiles.tld "   prefix= "tiles "   %>
<%@   page   import= "java.util.*,org.apache.struts.util.LabelValueBean "   %>
<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.01   Transitional//EN ">
<html:html>
    <head>
        <title> AddCD.jsp </title>
<meta   http-equiv= "pragma "   content= "no-cache ">
<meta   http-equiv= "cache-control "   content= "no-cache ">
<meta   http-equiv= "expires "   content= "0 ">        
<meta   http-equiv= "keywords "   content= "keyword1,keyword2,keyword3 ">
<meta   http-equiv= "description "   content= "This   is   my   page ">
    </head>
   
    <body>
        <%
        ArrayList   list=new   ArrayList();
        list.add(new   LabelValueBean( "show   value1 ", "value1 "));
              list.add(new   LabelValueBean( "show   value2 ", "value2 "));
              list.add(new   LabelValueBean( "show   value3 ", "value3 "));
        list.add(new   LabelValueBean( "show   value4 ", "value4 "));
        pageContext.setAttribute( "valuelist ",list);
          %>
        <html:select   property= "abc ">
        <html:options   collection= "valuelist "   property= "value "   labelProperty= "label "   />
        </html:select>
    </body>
</html:html>

执行的时候确报告这种异常:
org.apache.jasper.JasperException:   Exception   in   JSP:   /manager/AddCD.jsp:38

35:           list.add(new   LabelValueBean( "show   value4 ", "value4 "));
36:           pageContext.setAttribute( "valuelist ",list);
37:             %>
38:           <html:select   property= "abc ">
39:           <html:options   collection= "valuelist "   property= "value "   labelProperty= "label "   />
40:           <