问题描述
- response.setHeader中url怎么传递参数
- response.setHeader(""Refresh""3url=/db_project/index/index.jsp?username=<%=name%>"");
name是我从servlet获取到的参数,没有问题,但是这样写jsp报错
为什么jsp会报错
解决方案
你把报的错误信息贴出来
解决方案二:
在myeclipse中编译都不通过
解决方案三:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 45 in the jsp file: /jsp/register.jsp
String literal is not properly closed by a double-quote
42: <%
43: String name=(String) request.getAttribute(""name"");
44: System.out.println(name);
45: response.setHeader(""Refresh""3url=/db_project/index/index.jsp?username=<%=name%>"");
46: %>
47:
48: /c:if
解决方案四:
response.setHeader(""Refresh""3;url=/db_project/index/index.jsp?username=<%=name%>"");试下。
解决方案五:
response的setHeader
时间: 2024-12-02 09:10:21