请教struts问题
我是用myeclipse创建的struts1.2的,然后建立了index.jsp和index2.jsp两个文件
index.jsp代码如下:
<jsp:forward page="index.do"></jsp:forward>
在struts-config.xml中配置如下:
<action
path="/index"
type="com.yschat.struts.action.IndexAction"
input="/index2.jsp"
/>
IndexAction.java代码如下:
运行index.jsp后,不能跳转到index2.jsp页面,怎么回事?谢谢!!
index.jsp代码如下:
<jsp:forward page="index.do"></jsp:forward>
在struts-config.xml中配置如下:
<action
path="/index"
type="com.yschat.struts.action.IndexAction"
input="/index2.jsp"
/>
IndexAction.java代码如下:
package com.yschat.struts.action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.sql.DataSource;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessages;
public class IndexAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
ActionMessages message=new ActionMessages();
return mapping.getInputForward();
}
}运行index.jsp后,不能跳转到index2.jsp页面,怎么回事?谢谢!!
...全文
相关推荐
struts1,struts2,webwork,线程安全问题
struts1,struts2,webwork,线程安全问题,easy518网 http://www.easy518.com/
struts中文问题,struts国际化问题——终极解决方案
经典的struts中文问题,国际化问题终极解决方案
struts2 路径问题
NULL 博文链接:https://cdxs2.iteye.com/blog/1925229
Struts的乱码问题
这是一个中文转化为相应的编码格式,在web页面里能够正常显示中文。
struts2框架源码分析及问题汇总
struts详细的源码分析,运行过程,想深入学习struts的小伙伴可以参看


Eclipse
