当前位置: 代码迷 >> Java Web开发 >> 新手 请
  详细解决方案

新手 请

热度:324   发布时间:2016-04-17 14:29:14.0
新手求助 请高手指点
报错如下:
java.lang.IllegalStateException
org.apache.coyote.tomcat5.CoyoteResponseFacade.sendRedirect(CoyoteResponseFacade.java:352)
org.apache.jsp.HandleSignUp_jsp._jspService(HandleSignUp_jsp.java:122)
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)


说是下面这段代码有问题,找了好久没找出来,谁能帮我看看。谢谢啦!
  <%
       
        ResultSet   rs=   null;
       
        String   SystemName   =(String)request.getParameter( "para2 ");
        String   ProName   =   (String)request.getParameter( "para3 ");
        SystemName   =   new   String(SystemName.getBytes( "ISO8859_1 "), "GB2312 ");
        ProName   =   new   String(ProName.getBytes( "ISO8859_1 "), "GB2312 ");
      //out.println(UserName);
     
        session.setAttribute( "SystemName ",SystemName);
        String   sqlstring   =   "select   *   from   SignUp   where   UserNch= ' "+UserName+ " '   and   SystemName= ' "+SystemName+ " '     and   ProName= ' "+ProName+ " ' ";
      DataBase   db=new   DataBase();
      db.DBConnection();
      rs=db.query(sqlstring);
      if(!rs.next())
      {
      sqlstring   =   "insert   into   SignUp   (UserNch,SystemName,ProName)   values   ( ' "+UserName+ " ', ' "+SystemName+ " ', ' "+ProName+ " ') ";
      db.update(sqlstring);
     
      sqlstring   = "select   *   from   exInfo   where   SystemName= ' "+SystemName+ " ' ";
      rs=db.query(sqlstring);
      if(rs.next())
      {
      response.sendRedirect( "ExSignUp.jsp ");
      }
      else   {response.sendRedirect( "SignUpSuccess.jsp ");}
      }
      else
      {
      response.sendRedirect( "SignUpYet.jsp ");
      }      
          %>


------解决方案--------------------
建议你查查jdk帮助
------解决方案--------------------
不知道是不是这个错误

ISO8859_1

ISO-8859-1
------解决方案--------------------
lz的这段代码什么意思:(一个if两个else)
if(rs.next())
{
response.sendRedirect( "ExSignUp.jsp ");
}
else
{
response.sendRedirect( "SignUpSuccess.jsp ");
本站暂不开放注册!
内测阶段只得通过邀请码进行注册!
 
  • 最近登录:Tue Nov 20 14:03:14 CST 2018
  • 最近登录:Tue Nov 20 14:03:14 CST 2018
  • 最近登录:Tue Nov 20 14:03:14 CST 2018
  • 最近登录:Tue Nov 20 14:03:14 CST 2018
  • 最近登录:Tue Nov 20 14:03:14 CST 2018