jsp 内的变量没有定义类型

解决方案 »

  1.   

    我都把jsp页面的内容全部删除了,留了个空的页面,还是有这个错!
      

  2.   

    <%@ page contentType="text/html;charset=GB2312" language="java" %>
    <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/tld/struts-html-el.tld" prefix="html-el" %>
    <%@ taglib uri="/WEB-INF/tld/struts-logic-el.tld" prefix="logic-el" %>
    <%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %><html:html>
    <head>
    <script>
    function doNext(){
    document.TestForm.submit()
    }
    </script>
    <title>云南电信公司流量分析表</title>
    </head><body><div align="left">
    <html:form  name="TestForm" action="/Test" method="post"><table  width="100%" border="0" cellspacing="0" cellpadding="1" id ="table1">
    <tr>
     <td align="left">地区号:
     <select property="areaCode" >
        <option value='*'>全部</option>
        <option value='0691'>景洪</option>
        <option value='0692'>德洪</option>
        <option value='0870'>昭通</option>
        <option value='0871'>昆明</option>
        <option value='0872'>大理</option>
        <option value='0873'>红河</option>
        <option value='0874'>曲靖</option>
        <option value='0875'>保山</option>
        <option value='0876'>文山</option>
        <option value='0877'>玉溪</option>
        <option value='0878'>楚雄</option>
        <option value='0879'>思茅</option>
        <option value='0881'>东川</option>
        <option value='0883'>临沧</option>
        <option value='0886'>怒江</option>
        <option value='0887'>迪庆</option>
        <option value='0888'>丽江</option>
     </select>
    </td>
    </tr>
    <tr>
     <td align="left">帐期:
     <select property="acctCycle" >
        <option value='200408'>200408</option>
        <option value='200409'>200409</option>
        <option value='200410' selected>200410</option>
     </select>
    </td>
    </tr>
    </table>
    <br>
    <table  width="100%" border="0" cellspacing="0" cellpadding="">
    <tr>
     <td>
     <html:button property="doit"  value="确 定"  onclick="doNext()"/>
     </td>
    </tr>
    </table>
    <br> 
        <table  width="100%" border="0" cellspacing="0" cellpadding="0" >        
          <tr>   
    <td width="10%" ></td>
    <td width="15%" >区内通话</td>
    <td width="15%" >区间通话</td>
    <td width="15%" >国内通话</td>
    <td width="15%" >港澳台通话</td>
    <td width="15%" >国际通话</td>
    <td width="15%" >合计</td>
          </tr>
          <tr>      
            <table  width="100%" border="0" cellspacing="0" cellpadding="0" >
             <tr>   
                    <td width="10%" >地区</td>
                    
                    <td width="5%" >时长</td>
            <td width="5%" >流量</td>
            <td width="5%" >费用</td>
            
            <td width="5%" >时长</td>
            <td width="5%" >流量</td>
            <td width="5%" >费用</td>
            
            <td width="5%" >时长</td>
            <td width="5%" >流量</td>
            <td width="5%" >费用</td>
            
            <td width="5%" >时长</td>
            <td width="5%" >流量</td>
            <td width="5%" >费用</td>
            
            <td width="5%" >时长</td>
            <td width="5%" >流量</td>
            <td width="5%" >费用</td>
            
            <td width="5%" >时长</td>
            <td width="5%" >流量</td>
            <td width="5%" >费用</td>
         
             
             </tr>
           <logic-el:iterate name="TestForm"  property="dataList" id="item" indexId="theIndex" >
                   <tr>
                     <td  width="10%" > <bean:write name="item" property="area" /></td>
                     
                     <td  width="5%" > <bean:write name="item" property="duration_qn"/></td>
                     <td  width="5%" > <bean:write name="item" property="detail_qn"/> </td>
                     <td  width="5%" > <bean:write name="item" property="fee_qn"/> </td>
                     
                     <td  width="5%" > <bean:write name="item" property="duration_qj"/> </td>
                     <td  width="5%" > <bean:write name="item" property="detail_qj"/> </td>
                     <td  width="5%" > <bean:write name="item" property="fee_qj"/> </td>
                     
                     <td  width="5%" > <bean:write name="item" property="duration_gn"/> </td>
                     <td  width="5%" > <bean:write name="item" property="detail_gn"/> </td>
                     <td  width="5%" > <bean:write name="item" property="fee_gn"/> </td>
                     
                     <td  width="5%" > <bean:write name="item" property="duration_ga"/> </td>
                     <td  width="5%" > <bean:write name="item" property="detail_ga"/> </td>
                     <td  width="5%" > <bean:write name="item" property="fee_ga"/> </td>
                     
                     <td  width="5%" > <bean:write name="item" property="duration_gj"/> </td>
                     <td  width="5%" > <bean:write name="item" property="detail_gj"/> </td>
                     <td  width="5%" > <bean:write name="item" property="fee_gj"/> </td>
                     
                     <td  width="5%" > <bean:write name="item" property="duration_hj"/> </td>
                     <td  width="5%" > <bean:write name="item" property="detail_hj"/> </td>
                     <td  width="5%" > <bean:write name="item" property="fee_hj"/> </td>
                     
                  </tr>
               </logic-el:iterate>
            </table>       
          </tr>
        </table>
    </html:form>
    </body>
    </html:html>
      

  3.   

    <logic-el:iterate name="TestForm"  property="dataList" id="item" indexId="theIndex" >
    好象是这句有问题,没有指定TestForm的类型。
    应该加上type="xx.xx.TestFormClass"
      

  4.   

    我把jsp页面的东西全部删了,还是会报这个错
      

  5.   

    现在估计不是代码的问题,很可能是主机环境的问题,是IBM的机器
      

  6.   

    问题我已经自己解决了
    <html:form  name="TestForm" action="/Test" method="post">
    把 name="TestForm" 去掉
    改成 <html:form  action="/Test" method="post">
      

  7.   

    你这只是权宜之计
    如果要用name="TestForm" 又怎么办