当前位置: 代码迷 >> Java相关 >> java.lang.ClassCastException异常
  详细解决方案

java.lang.ClassCastException异常

热度:938   发布时间:2007-11-22 14:51:50.0
java.lang.ClassCastException异常
这个是我用来显示的页面 struts标签我已经引了
我不知道为何ACTION没有调用,提交之后,就出现下面的异常:
<html:form action="/jsp/dhzxtj/dhzxtjAction.do?AMethod=dhzxFind" method="post">
<table width="780" border="0" cellspacing="0" cellpadding="0">
<tr><td>
   <table width="780" border="1">
   <tr align="center" height="24">
    <td colspan="10" class="tdtitle">请输入电话咨询统计的时间段</td>
   </tr>
   <tr>
    <td width="460" >   
      咨询日期:  从
      <html:text property="dhzxRqstart" readonly="true" size="10" maxlength="10"  />
      <img src="<%=path%>/images/datetime.gif" width="16" height="16" border="0" >
      到
      <html:text property="dhzxRqstop" readonly="true" size="10" maxlength="10"  />
      <img src="<%=path%>/images/datetime.gif" width="16" height="16" border="0" >
      <html:hidden property="method" />
      <html:hidden property="dhzxLsh"/>
      <html:hidden property="currentPage"/>
    </td>
    <td width="320">
      (如不填写,则默认为当前日期!)   
    </td>
    <td>
     <input type="submit" name="提交" value="提交"/>
    </td>
   </tr>
   </table>
</td></tr>
<tr><td>
  <table width="780" border=1 cellpadding=0 cellspacing=0 class=TABLE id=oTable style="BORDER-COLLAPSE: collapse" >      
         <tr align="center" height="24">
    <td colspan="10">电话咨询统计结果</td>
   </tr>
   <tr class="tdtitle" align="center">
            <td class="tdtitle" width="7%" >咨询编号</td>
            <td style="display:none" >热线电话</td>
            <td class="tdtitle" width="20%" >来电号码</td>
            <td class="tdtitle" width="18%" >咨询日期</td>
            <td class="tdtitle" width="25%" >咨询内容</td>
            <td class="tdtitle" width="30%" >备注</td>
   </tr>      
<%
  Object temp;
  temp = request.getAttribute("pageInfo");
  if(temp != null){
   PageBean pageBean = (PageBean)temp;
   int i = 0 ;
   for (Iterator it = pageBean.getList().iterator(); it.hasNext();) {
   i++;
   DhzxBean bean = (DhzxBean)it.next();
  
%>
   <tr  align="center" class=<%if(i%2==0) {out.print("repTd1");} else {out.print("repTd");}%>>
    <td><%=bean.getDhzx_lsh()%></td>
    <td style="display:none"  width="0%"><%=bean.getDhzx_rxdh()%></td>
    <td><%=bean.getDhzx_dhhm()%></td>  
    <td><%=bean.getDhzx_rq()%></td>
    <td align="left"><%=bean.getDhzx_nr()%></td>
    <td align="left"><%=bean.getDhzx_bz()%></td>
    <td  style="display:none"  width="0%"></td>
   </tr>
<%   
   }
%>
   <tr align="right" valign="middle" height="22" borderColor=#E9EFFF bgcolor="#E9EFFF" >
    <td colspan="6">   
        <%
      if (pageBean.getCurrentPage()!= 1){
     %>
      <a href="#" >首页</a>
      <a href="#" >上一页</a>
     <%
      }else{
     %>
      首页
      上一页
     <%
      }
      if(pageBean.getCurrentPage()!=pageBean.getMaxPage()){
     %>
      <a href="#" >下一页</a>
      <a href="#" >尾页</a>
     <%
      }else{
     %>
      下一页
      尾页
     <%
      }
     %>
       <%=pageBean.getCurrentPage()%>/<%=pageBean.getMaxPage()%>页
           (共 <%=pageBean.getMaxRowCount()%> 条记录)
      </td>
    </tr>
  <%
   
   }
  %>      
  </table>
</td></tr>
</table>
</html:form>








HTTP Status 500 - type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception org.apache.jasper.JasperException    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)    org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)    javax.servlet.http.HttpServlet.service(HttpServlet.java:709)    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)    tide.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:32)
root cause java.lang.ClassCastException    org.apache.jsp.jsp.dhzxtj.Tj_jsp._jspService(Tj_jsp.java:177)    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)    org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)    javax.servlet.http.HttpServlet.service(HttpServlet.java:709)    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)    tide.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:32)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.




请各位好友相互!
搜索更多相关的解决方案: java  lang  ACTION  form  

----------------解决方案--------------------------------------------------------
  相关解决方案