strust1配置

阅读更多

1.web.xml中加入struts1的过滤器,使web项目支持struts1


    action
    
        org.apache.struts.action.ActionServlet
    
    
        config
        
        /WEB-INF/struts-config.xml
    
    1


    action
    *.do

2.创建stauts-config.xml文件,配置action




	
		
		
			
			
		
		
			
		
	

 3.添加ActionLoginAction.java

public class LoginAction extends Action {
	@Override
	// Action 处理请求
	public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("success");
//		return super.execute(mapping, form, request, response);
	}
}

4.jsp页面使用超链接跳转

goto

  

 

 

 

你可能感兴趣的:(struts1)