1.JSP无法编译

来源:互联网 发布:脊柱侧弯 知乎 编辑:程序博客网 时间:2024/06/14 12:20

错误提示:

description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSPNo Java compiler was found to compile the generated source for the JSP. This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK to the common/lib directory of the Tomcat server, followed by a Tomcat restart. If using an alternate Java compiler, please check its installation and access path.org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:413) org.apache.jasper.compiler.Compiler.compile(Compiler.java:453) org.apache.jasper.compiler.Compiler.compile(Compiler.java:437) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856)note The full stack trace of the root cause is available in the Tomcat logs.

解决办法

法一:把jdk安装目录下lib/tools.jar 复制到tomcat  的common/lib 下就ok了法二:修改jvm大小JAVA_OPTS="-server -Xms512m -Xmx1024m"




原创粉丝点击