ITeye博客

struts2 转发

luhuajcdd · 2010-11-22 09:34 · struts2 · 企业架构 · Struts · XML · JSP · Web · Markdown

struts2中转发: 类ActionForward中的代码 package com.luhua.action; import com.opensymphony.xwork2.ActionSupport; public class ActionForward extends ActionSupport{ private static final long serialVersionUID = 1L; public String execute(){ return "success" ; } } 1.从action到页面 struts.xml的配置如下: /WEB-INF/page/index.jsp [color=red] /WEB-INF/page/index.jsp 这里WEB-INF前面必须加上/ ,[/color] 2.同一包中,action跳action /WEB-INF/page/index.jsp /first [color=red] /first 这里可以加/可以不加,[/color]

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。