To:yangxiao_jiang
代码很简单
<%@ page contentType="text/html;
charset="
language="java"
import="java.sql.*"
errorPage=""
%>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=gb2312">
<title>无标题文档</title>
<%
String str="a";
String a;
a=str.replaceAll("'","''"
;
%>
</head>
<body>
</body>
</html>
jsp出错:
Unhandled error! You might want to consider having an error page to report such errors more gracefully
com.sun.jsp.JspException: Compilation failed
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at javax.servlet.ServletException.(Compiled Code)
at com.sun.jsp.JspException.(JspException.java:29)
at com.sun.jsp.compiler.Main.compile(Compiled Code)
at com.sun.jsp.runtime.JspLoader.compile(JspLoader.java:86)
at com.sun.jsp.runtime.JspLoader.loadJSP(Compiled Code)
at com.sun.jsp.runtime.JspServlet$JspServletWrapper.loadIfNecessary(Compiled Code)
at com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(Compiled Code)
at com.sun.jsp.runtime.JspServlet.serviceJspFile(Compiled Code)
at com.sun.jsp.runtime.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(Compiled Code)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(Compiled Code)
at com.ibm.servlet.engine.webapp.IdleServletState.service(Compiled Code)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(Compiled Code)
at com.ibm.servlet.engine.webapp.ServletInstance.service(Compiled Code)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(Compiled Code)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(Compiled Code)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(Compiled Code)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(Compiled Code)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(Compiled Code)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(Compiled Code)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(Compiled Code)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(Compiled Code)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(Compiled Code)
at com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(Compiled Code)
at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(Compiled Code)
at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(Compiled Code)
at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.notifyService(Compiled Code)
at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.run(Compiled Code)
at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)