首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

为什么浏览器会报对象为空呢

2011-12-20 
为何浏览器会报对象为空呢?%@pagecontentType text/htmlcharsetgb2312 %%@pageimport java.sql.

为何浏览器会报对象为空呢?
<%@   page   contentType= "text/html;   charset=gb2312 "   %>
<%@   page   import= "java.sql.* "   %>
<%@   page   language= "java "   %>
<%@   page   import= "java.util.Date "   %>
<%@   page   import= "common.* "   %>
<%@   page   import= "java.text.* "   %>
<jsp:useBean   id= "checkdata "   class= "common.CheckData "   scope= "page "   />
<jsp:useBean   id= "user "   class= "simis.User "   scope= "session "   />
<%if   (!user.isLogin())   {%>
          <jsp:include   page= "loginFail.jsp "   flush= "true "   />
<%}   else   {%>

<%!
String   strSQL   =null;//查询语句
String   strYear=null;       //年份
String   strBegin=null;//起始年月
String   strEnd=null;//终止年月
String   isNull   =null;//存放年份
Date   nowDate   =   new   Date();
ResultSet   rs   =   null;
DBSQL   db   =   new   DBSQL();
CodeTable   codeTable   =   null;
%>
<%
        isNull   =   request.getParameter( "Year ");
      if(isNull   !=   null)
      {
              strYear   =   isNull;
      }
      else   if(user.getYear()   !=   null)
      {
              strYear   =   user.getYear();
      }
      else
      {
              strYear   =Integer.toString(DateTool.convertDateToYear(nowDate));
      }
      strBegin   =   strYear;
      strEnd   =   Integer.toString(Integer.parseInt(strYear)+1);

String   strBegin=null;//起始年月和       else   if(user.getYear()   !=   null).
一进这个网页先报前者对象为空,查询其他年份就报后者对象为空.
如何解决呢?谢谢.


[解决办法]
your javabean has a error.

热点排行