sitemesh官方网站上只有很久以前的2.4.1版本[url]http://www.opensymphony.com/sitemesh/download.action[/url],而这个版本不支持google appengine。
[img]http://dl.iteye.com/upload/attachment/155570/e50f5f1e-ed9b-367d-b1c8-91b957b6685e.png[/img]
会出现如下的错误:
Error for /
java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google App Engine developer's guide for more details.
at com.google.apphosting.runtime.security.shared.stub.javax.naming.InitialContext.<clinit>(InitialContext.java)
at com.opensymphony.module.sitemesh.Factory.getEnvEntry(Factory.java:91)
……
通过修改sitemesh源代码,将Factory类的其中一行catch(Exception e)改成catch(Trowable e)即可解决问题。
打包好的jar文件在附件里。
[img]http://dl.iteye.com/upload/attachment/155570/e50f5f1e-ed9b-367d-b1c8-91b957b6685e.png[/img]
会出现如下的错误:
Error for /
java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google App Engine developer's guide for more details.
at com.google.apphosting.runtime.security.shared.stub.javax.naming.InitialContext.<clinit>(InitialContext.java)
at com.opensymphony.module.sitemesh.Factory.getEnvEntry(Factory.java:91)
……
通过修改sitemesh源代码,将Factory类的其中一行catch(Exception e)改成catch(Trowable e)即可解决问题。
打包好的jar文件在附件里。