<package name="hello" namespace="/" extends="struts-default"> <action name="hello"> <result>/Hello.jsp</result> </action> </package> <package name="resultTypes" namespace="/r" extends="struts-default"> <action name="r1"> <result type="dispatcher">/r1.jsp</result> </action> <action name="r3"> <result type="chain">r1</result> </action> <action name="r4"> <result type="chain"> <param name="actionName">hello</param> <param name="namespace">/</param> </result> </action>
其中,r4跨package跳转到hello
本文详细解析了Struts框架的配置文件,展示了如何通过配置实现跨包的动作跳转,包括使用dispatcher和chain结果类型来控制流程。具体示例中,r4动作跨包调用hello动作,深入理解Struts配置的灵活性。
5283

被折叠的 条评论
为什么被折叠?



