随笔分类 -  Struts2

摘要:一、struts.xml 1 2 3 4 8 9 /tags.jsp10 11 二、Action 1 package cn.su.action; 2 3 import com.opensymp... 阅读全文
posted @ 2014-04-18 01:34 XIAOHEI丨 阅读(209) 评论(0) 推荐(0)
摘要:一、配置文件 1 2 5 6 7 8 9 10 11 15 16 17 /ognl.jsp18 19 20 21 二、Action Action中用到的User对象 ... 阅读全文
posted @ 2014-04-17 18:27 XIAOHEI丨 阅读(125) 评论(0) 推荐(0)
摘要:一、配置文件 1 7 8 9 13 14 /index.jsp15 16 17 /index.jsp18 19 20 ... 阅读全文
posted @ 2014-04-17 15:30 XIAOHEI丨 阅读(144) 评论(0) 推荐(0)
摘要:一、配置文件 1 2 10 11 12 /r1.jsp13 14 15 16 /r2.jsp17 18 19 ... 阅读全文
posted @ 2014-04-17 14:55 XIAOHEI丨 阅读(213) 评论(0) 推荐(0)
摘要:一、配置文件strtus.xml 1 2 5 6 7 8 9 13 14 15 default.xml 1 2 5 6 7 8 12 13 14 /de... 阅读全文
posted @ 2014-04-17 11:58 XIAOHEI丨 阅读(287) 评论(0) 推荐(0)
摘要:一、struts.xml 1 8 9 10 /index.jsp11 12 二、获取Map类型的reuqest、session、applicationpackage cn.su.action;import java.ut... 阅读全文
posted @ 2014-04-17 10:57 XIAOHEI丨 阅读(153) 评论(0) 推荐(0)
摘要:一、配置文件 1 2 3 6 7 8 /index.jsp 9 10 二、Action 1 package cn.su.action; 2 3 import com.opensymphony.xwo... 阅读全文
posted @ 2014-04-16 23:29 XIAOHEI丨 阅读(155) 评论(0) 推荐(0)
摘要:一、domain1 package cn.su.domain;2 3 public class User {4 public String name; /*要想struts2正确的赋值,domain类的属性也要提供set方法*/5 public void setName(St... 阅读全文
posted @ 2014-04-16 20:31 XIAOHEI丨 阅读(175) 评论(0) 推荐(0)
摘要:一、Action1 public class UserAction extends ActionSupport {2 public String add(){3 return "success";4 }5 public String delete(){6 ... 阅读全文
posted @ 2014-04-16 17:32 XIAOHEI丨 阅读(164) 评论(0) 推荐(0)
摘要:一、Action 1 public class UserAction extends ActionSupport { 2 public String show(){ 3 return "show"; 4 } 5 public String add(){ 6 ... 阅读全文
posted @ 2014-04-16 16:38 XIAOHEI丨 阅读(129) 评论(0) 推荐(0)
摘要:一、Action类 1 public class Action1 extends ActionSupport { 2 /*创建Action的方式 3 * 继承自ActionSupport 4 * */ 5 @Override 6 public String... 阅读全文
posted @ 2014-04-16 16:11 XIAOHEI丨 阅读(119) 评论(0) 推荐(0)
摘要:/index.jsp 阅读全文
posted @ 2014-04-16 15:40 XIAOHEI丨 阅读(180) 评论(0) 推荐(0)
摘要:如何在项目中使用Strust2呢?一、准备步骤 下载Struts2的类库 下载完成后解压,下面是解压完成后的目录 apps:示例程序 docs: 文档 lib:类库 src:源码二、搭建开发环境 1.首先在MyEclipse中创建一个web项目:Struts2_Hello 2.导... 阅读全文
posted @ 2014-04-16 15:18 XIAOHEI丨 阅读(127) 评论(0) 推荐(0)