ssh 整合 一直报错 找不到action 无语了 实在找不到问题再哪 高手帮帮忙 50
index.jsp<body><formname="login"action="loginone.action"method="post">用户名:<inputname=...
index.jsp
<body>
<form name="login" action="loginone.action" method="post">
用户名:
<input name="username" type="text" />
密码:
<input name="password" type="password">
<input type="submit" value="登录"/>
</form>
</body>
</html>
******************************************************
struts
<struts>
<package name="SSH" extends="struts-default">
<action name="loginone" class="LoginOneAction">
<result name="SUCCESS">/Success.jsp</result>
<result name="FAILURE">/Failure.jsp</result>
</action>
</package>
</struts>
*******************************
spring 配置
<!-- 用户添加的Bean -->
<bean id="LoginOneAction" class="com.action.LoginOneAction" scope="prototype"/>
<property name="mgr" ref="mgr"></property>
</bean>
<bean id="mgr" class="com.service.impl.ActionManagerImpl">
<property name="UserDAO" ref="hwpuserDAO"></property>
</bean>
<bean id="hwpuserDAO" class="com.dao.impl.UserDAOImpl">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean> 展开
<body>
<form name="login" action="loginone.action" method="post">
用户名:
<input name="username" type="text" />
密码:
<input name="password" type="password">
<input type="submit" value="登录"/>
</form>
</body>
</html>
******************************************************
struts
<struts>
<package name="SSH" extends="struts-default">
<action name="loginone" class="LoginOneAction">
<result name="SUCCESS">/Success.jsp</result>
<result name="FAILURE">/Failure.jsp</result>
</action>
</package>
</struts>
*******************************
spring 配置
<!-- 用户添加的Bean -->
<bean id="LoginOneAction" class="com.action.LoginOneAction" scope="prototype"/>
<property name="mgr" ref="mgr"></property>
</bean>
<bean id="mgr" class="com.service.impl.ActionManagerImpl">
<property name="UserDAO" ref="hwpuserDAO"></property>
</bean>
<bean id="hwpuserDAO" class="com.dao.impl.UserDAOImpl">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean> 展开
2015-07-28
展开全部
<form action="/loginone.action">
追问
这样也不行 已试过
HTTP Status 404 - /loginone.action
type Status report
message /loginone.action
description The requested resource (/loginone.action) is not available.
Apache Tomcat/6.0.32
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询