java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()


java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;

今天在部署时居然报了这么个错.

查后发现,getContextPath()在servlet 2.5下才有的,

servlet 2.4是没有这个方法的.

特此记录.

建servlet-api.jar换成2.5以上的即可。

猜你喜欢

转载自shengren-wang.iteye.com/blog/1904201