Thursday, April 30, 2009

Struts/OGNL on GAE

Trying to run struts 2 on GAE I've ran into a number of issues. This is one of them. Apparently the object traversing language OGNL have a security manager which does not agree with the jvm in GAE. To disable it, just call OgnlRuntime.setSecurityManager(null) (kudos). Otherwise you'll get this error message:
Method [public void org.apache.struts2.dispatcher.StrutsResultSupport.setLocation(java.lang.String)] cannot be accessed

Put the snippet in a ServletContextListener and it'll be executed on startup.

No comments:

Post a Comment