gpt4 book ai didi

java - org.apache.jasper.JasperException : Unable to compile class for JSP and java. io.FileNotFoundException : programs_jsp. java(权限被拒绝)

转载 作者:行者123 更新时间:2023-11-28 22:43:16 25 4
gpt4 key购买 nike

我正在将带有 JSP 页面的应用程序从 Weblogic 服务器移动到 Tomcat,但在执行此操作时遇到以下错误。我创建了一个部署在 tomcat 上的 war 文件,并将其放在 tomcat 的 webapps 文件夹中,然后运行 ​​bin/startup.sh 脚本将 war 文件部署到 tomcat 服务器上。但是,当我查看 tomcat 目录下的工作文件夹时,它是空的并且没有文件 /opt/mw/tomcat/ssloyalty-qa/ssloyalty-gui/work/Catalina/localhost/traveler/org/apache/jsp/pages/programs_jsp.java (Permission denied) 中提到的错误。我的应用程序中有几个 JSP 页面可以正确显示,没有任何错误。只有少数人抛出了下面给出的这个错误。

Exception:
org.apache.jasper.JasperException: Unable to compile class for JSP
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:604)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062)
(...)

Caused by:
java.io.FileNotFoundException: /opt/mw/tomcat/ssloyalty-qa/ssloyalty-gui/work/Catalina/localhost/traveler/org/apache/jsp/pages/programs_jsp.java (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:194)
at java.io.FileOutputStream.(FileOutputStream.java:84)
at org.apache.jasper.compiler.Compiler.setupContextWriter(Compiler.java:298)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:230)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
(...)

最佳答案

确保启动tomcat服务器的用户对以下文件夹有写入权限。

/opt/mw/tomcat/ssloyalty-qa/ssloyalty-gui/work/Catalina/localhost/

关于java - org.apache.jasper.JasperException : Unable to compile class for JSP and java. io.FileNotFoundException : programs_jsp. java(权限被拒绝),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19431118/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com