解决在appengine上不能使用sitemesh

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文件在附件里。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值