使用spring表单标签库时出现的一个错误

2008年12月26日  | 标签: ,

错误信息:
org.apache.jasper.JasperException: No WebApplicationContext found: no ContextLoaderListener registered?

解决办法:
在web.xml中除了需要配置表单标签库之外还需要加入以下代码,否则资源文件加载不进来。

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>?

在web应用的web.xml文件中声明一个ContextLoaderListener的作用是:
在系统启动时执行该Listener,读取spring的xml配置文件

类别(j2ee) | 浏览(1,059) | 发表评论 | Trackback
目前还没有任何评论.