各位大侠好!
<result name="add_room" type="chain">listRoom
</result>
这是struts.xml文件的成功代码 从一个action跳转到另外一个action
请问在注解里面如何配置?
@Result(name = "add_factory", location = "room!list", type = "chain"),
无法挑战 请问要用注解如何配置?
<result name="add_room" type="chain">listRoom
</result>
这是struts.xml文件的成功代码 从一个action跳转到另外一个action
请问在注解里面如何配置?
@Result(name = "add_factory", location = "room!list", type = "chain"),
无法挑战 请问要用注解如何配置?
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <!-- 对Spring容器进行实例化 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> <!--
指定spring的配置文件,默认从web根目录寻找配置文件,我们可以通过spring提供的classpath:前缀指定从类路径下寻找
-->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<!-- 配置struts过滤器 配置将过滤所有以.do后缀命名的action请求 -->
<filter>
<filter-name>struts 2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
<!-- 使用零配置 struts2-convention-plugin-2.1.8.1.jar 必须要加入 -->
<init-param>
<param-name>actionPackages</param-name>
<param-value>com.rh.action</param-value>
</init-param>
</filter> <filter-mapping>
<filter-name>struts 2</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping> <welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list></web-app>
上面是我的web.xml文件?请问我少了什么么?
@Result(name = "add_factory", location = "list", type = "chain",params={"method","list"}),
看看行不行