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

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

热度:1012   发布时间: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> ");
----------------解决方案--------------------------------------------------------
  相关解决方案