ssh配置没问题,但是页面始终无法执行action!!!!!!求大神解答

Mrseal丶 2017-10-19 03:29:10
web.xml是
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

先是spring,applicationContext
<!-- 配置action -->
<bean id="usersAction" class="com.kygl.action.UsersAction" scope="prototype" >
<property name="usersService" ref="usersService"></property>
</bean>
<!-- 配置service -->
<bean id="usersService" class="com.kygl.service.impl.UsersServiceImpl" scope="prototype">
<property name="usersDao" ref="usersDao"></property>
</bean>
<!-- 配置dao -->
<bean id="usersDao" class="com.kygl.dao.impl.UsersDAOImpl" scope="prototype">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>


然后是struts.xml
<package name="com.kygl.action" extends="struts-default" namespace="/">
<action name="users_login" class="usersAction" method="login" >
<result name="LOGIN">/jsp/UsersLogin_success.jsp</result>
<result name="ERROR">/jsp/UsersLogin.jsp</result>
</action>
</package>

hibernate映射没问题,然后运行
页面出现404错误
HTTP Status 404 - There is no Action mapped for namespace /jsp and action name users_login.

type Status report

message There is no Action mapped for namespace /jsp and action name users_login.

description The requested resource is not available.

Apache Tomcat/8.5.9

求解答,什么src位置问题这种没犯!!
...全文
270 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_39912309 2017-10-19
  • 打赏
  • 举报
回复
ssh框架的web.xml不需要<servlet>标签吗?
一个治疗术 2017-10-19
  • 打赏
  • 举报
回复
引用 2 楼 pany1209 的回复:
[quote=引用 1 楼 aschouas 的回复:] 贴代码
刘德华。。。。。[/quote] 吴彦祖。。。。。
李德胜1995 2017-10-19
  • 打赏
  • 举报
回复
引用 1 楼 aschouas 的回复:
贴代码
刘德华。。。。。
一个治疗术 2017-10-19
  • 打赏
  • 举报
回复
贴代码

81,090

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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