天理何在 strtus-config.xml不认!!!!!!!!!!!!

boyboy66 2006-03-31 02:55:23
在strtus-config.xml里不加插件,提示:

java.lang.IllegalStateException: Could not find ContextLoaderPlugIn's WebApplicationContext as ServletContext attribute [org.springframework.web.struts.ContextLoaderPlugIn.CONTEXT.]: Did you register [org.springframework.web.struts.ContextLoaderPlugIn]?



加了
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/springconfig.xml" />
</plug-in>

就提示:
HTTP Status 404 - Servlet action is not available

whyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

...全文
157 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
aftarms 2006-03-31
  • 打赏
  • 举报
回复
主要就要看,web.xml里的配置啦。可能没有加楼上说的配置。
或者就是要看,你的struts-config.xml里的Action有没有配好。
如果都没有问题。就要看你的springconfig.xml有没有加那个
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
nitness 2006-03-31
  • 打赏
  • 举报
回复
请检查你web.xml文件。
以及struts-config.xml文件。

web.xml 要加上类似下面的配置.

<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</init-param>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧