SSH里开始struts运行正常添加spring后开始报错404

ly675945301 2016-04-19 04:09:11
如题
版本:javaee 6.0 struts1.2 spring3.0


在 <message-resources> 标签后面添加了:
<plug-in className=”org.springframework.web.struts.ContextLoaderPlugIn”>
<set-property property=”contextConfigLocation” value=”/WEB-INF/applicationContext.xml” />
</plug-in>

修改 LoginAction 的配置( type 属性):
<action-mappings >
<action
attribute=”loginForm”
input=”/login.jsp”
name=”loginForm”
path=”/login”
scope=”request”

type=”org.springframework.web.struts.DelegatingActionProxy” />
</action-mappings>

修改 Spring 配置文件 applicationContext.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE beans PUBLIC “-//SPRING//DTD BEAN//EN” “http://www.springframework.org/dtd/spring-beans.dtd”>
<beans>
<bean name=”/login” class=”com.yourcompany.struts.action.LoginAction” scope="prototype"></bean>
</beans>
...全文
153 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ly675945301 2016-04-19
  • 打赏
  • 举报
回复
没人么
约定终点 2016-04-19
  • 打赏
  • 举报
回复
struts1 没玩过 我也看看
ly675945301 2016-04-19
  • 打赏
  • 举报
回复
在线等~~~

67,550

社区成员

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

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