jsp获取url参数问题
common.js
function callDailogPage(url,flag){
var DailogUrl = "showDailog.jsp" + "?flag=" +flag + "&url=" + url;
returnValue = window.showModalDailog(DailogUrl,this);
if(typeof(returnValue) === "undefined"){
returnValue = "";
}
insertWord(returnValue);
}
showDailog.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="ISO-8859-1"%>
<%
String flag = request.getParameter("flag");
String url = request.getParamenter("url");
%>
报如下的错误,请问如何解决
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 5 in the jsp file: /src/jsp/showDailog.jsp
The method getParamenter(String) is undefined for the type HttpServletRequest
2: pageEncoding="UTF-8"%>
3: <%
4: String flag = request.getParameter("flag");
5: String url = request.getParamenter("url");
6: %>
7: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
8: <html>
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:339)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
------解决方案--------------------你重启一个tomcat,然后把这个项目重新发布,就可以了。
------解决方案--------------------pageEncoding="ISO-8859-1"里面的改成gb2312
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.aiyiweb.com/j2ee/2308.html