org.apache.jasper.JasperException: java.security.AccessControlException

今天开始将spring整合到GAE上,竟然出现了问题。根据网络资料是不要使用spring-all-in-one jar,主要是javax.naming等问题,我也特别留意了一下,只用了需要用的spring的几个jar。报错如下

Struts has detected an unhandled exception: 

Messages: access denied (java.io.FilePermission jar:file:\C:\Documents and Settings\Xredman\workspace\neil-blog\war\WEB-INF\lib\struts2-core-2.1.8.1.jar read) 
java.security.AccessControlException: access denied (java.io.FilePermission jar:file:\C:\Documents and Settings\Xredman\workspace\neil-blog\war\WEB-INF\lib\struts2-core-2.1.8.1.jar read) 
 
File: java/security/AccessControlContext.java 
Line number: 

 

Stacktraces
org.apache.jasper.JasperException: java.security.AccessControlException: access denied (java.io.FilePermission jar:file:\C:\Documents and Settings\Xredman\workspace\neil-blog\war\WEB-INF\lib\struts2-core-2.1.8.1.jar read) 
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    com.google.appengine.tools.development.PrivilegedJspServlet.access$101(PrivilegedJspServlet.java:23)
    com.google.appengine.tools.development.PrivilegedJspServlet$2.run(PrivilegedJspServlet.java:59)
    java.security.AccessController.doPrivileged(Native Method)

 

 这肯定是权限问题了,可是问题出在哪里呢?基本上没有头绪

后来根据GAE的讨论记录寻找了一种解决方案,就是更改struts.xml

<constant name="struts.devMode" value="true" />

 

 将开发模式设置为false即可

你可能感兴趣的:(java,apache,spring,Security,GAE)