jsp报String literal is not properly closed by a double-quote
请各位高人解答一下
<%@page language="java" import="java.util.*" pageEncoding="gbk" %>
<%
String username =(String)session.getAttribute("username");
if(username == null) {
out.println("<script type=\"text/javascript\">");
out.println("alert(\"您还没登录,请登录后再下载\");");
out.println("open(\"login.jsp\",\"_self\");");
out.println("</script>");
}else{
out.println("欢迎会员,请下载");
out.println("<a href=\"logout.jsp\”>退出登录</a>");
}
%>
报错是
exception
org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: 2 in the jsp file: /doDownload.jsp
Generated servlet error:
String literal is not properly closed by a double-quote
谢谢了个位大侠!这是怎么回事?
------解决方案--------------------
你这样,里层的双引号全部换成单引号试试。
------解决方案--------------------
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.aiyiweb.com/j2ee/2308.html