首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

解决在appengine下不能使用sitemesh

2012-10-24 
解决在appengine上不能使用sitemeshsitemesh官方网站上只有很久以前的2.4.1版本http://www.opensymphony.c

解决在appengine上不能使用sitemesh
sitemesh官方网站上只有很久以前的2.4.1版本http://www.opensymphony.com/sitemesh/download.action,而这个版本不支持google appengine。

会出现如下的错误:
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文件在附件里。 1 楼 ferreousbox 2009-11-11   刚解决jsp中文编码的问题,又出现了这个问题,agent比以前似乎严格多了。感谢分享

热点排行