当前位置: 代码迷 >> Java Web开发 >> 在jsp中遇到一点问题String literal is not properly closed by a double-q ...
  详细解决方案

在jsp中遇到一点问题String literal is not properly closed by a double-q ...

热度:344   发布时间:2012-04-02 14:39:20.0
在jsp中遇到一点问题String literal is not properly closed by a double-quote是什么问题呀,我写的程序一直
<%@page contentType="text/html;charset=gb2312"%>

<%
String username=request.getParameter("username");

String password=request.getParameter("password");

String type=request.getParameter("type");

if(username.equals("admin")&&password.equals("admin"))
     {  
        
         session.setAttribute("username",username);
         session.setAttribute("password",password);
         session.setAttribute("type",type);
          if(type.equals("manager "))
               response.sendRedirect("manager.jsp");
             else if(type.equals("user"))

              response.sendRedirect("user.jsp");
            else{
               out.print("<script language='JavaScript' type='text/JavaScript'>
               alter("请正确填写信息!");</script> ");
            
     response.sendRedirect("admin.jsp");
           


    }   
  
}
     
else{

     out.print("<script>alert('请正确填写信息!');window.location.href='admin.jsp'</script>");
  

  }

   
%>
  



搜索更多相关主题的帖子: html  jsp  properly  password  manager  

----------------解决方案--------------------------------------------------------
out.print("<script language='JavaScript' type='text/JavaScript'>
               alter("请正确填写信息!");</script> ");
错误,alert方法都写错啦
out.print("<script  type='text/JavaScript'>");
    out.print("alert('请正确填写信息!');");
   out.print("</script> ");
----------------解决方案--------------------------------------------------------
  相关解决方案
本站暂不开放注册!
内测阶段只得通过邀请码进行注册!
 
  • 最近登录:Wed Dec 13 07:42:03 CST 2017
  • 最近登录:Wed Dec 13 07:42:03 CST 2017
  • 最近登录:Wed Dec 13 07:42:03 CST 2017
  • 最近登录:Wed Dec 13 07:42:03 CST 2017
  • 最近登录:Wed Dec 13 07:42:03 CST 2017