摘要: Struts2究竟能做什么呢 Struts2框架的完整工作流程 搭建Struts2开发环境的步骤1.创建javaweb工程2.找到开发Struts2应用需要使用到的jar文件3.创建jsp文件4.创建action文件5.编写Struts2的配置文件6.在web.xml中加入Struts2 MVC框架启动配置 2 、开发Struts2需要的jar文件 到http://struts.apache.org/download.cgi#struts2314下载struts-2.x.x-all.zip,目前最新版为2.3.14。下载完后解压文件,开发struts2应用需要依赖的jar文... 阅读全文
posted @ 2013-05-15 16:58 hacket520 阅读(455) 评论(0) 推荐(0) 编辑
摘要: 通配符举例--BookAction 1 public class BookAction extends ActionSupport { 2 3 public String execute() throws Exception { 4 System.out.println("BookAction ********** execute()"); 5 return null; 6 } 7 /* 8 * 显示图书添加页面 9 */10 public String add(){11 System.out... 阅读全文
posted @ 2013-05-15 00:43 hacket520 阅读(222) 评论(0) 推荐(0) 编辑
摘要: struts2 --通配符和动态方法调用1、jsp test.jsp 1 <%@ page language="java" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%> 2 <%@ taglib uri="/struts-tags" prefix="s"%> 3 <html> 4 <head> 5 <title>My JSP 'index.jsp 阅读全文
posted @ 2013-05-15 00:17 hacket520 阅读(380) 评论(0) 推荐(0) 编辑