摘要:
一、配置文件 1 2 3 6 7 8 /index.jsp 9 10 二、Action 1 package cn.su.action; 2 3 import com.opensymphony.xwo... 阅读全文
摘要:
一、domain1 package cn.su.domain;2 3 public class User {4 public String name; /*要想struts2正确的赋值,domain类的属性也要提供set方法*/5 public void setName(St... 阅读全文
摘要:
一、Action1 public class UserAction extends ActionSupport {2 public String add(){3 return "success";4 }5 public String delete(){6 ... 阅读全文
摘要:
一、Action 1 public class UserAction extends ActionSupport { 2 public String show(){ 3 return "show"; 4 } 5 public String add(){ 6 ... 阅读全文
摘要:
一、Action类 1 public class Action1 extends ActionSupport { 2 /*创建Action的方式 3 * 继承自ActionSupport 4 * */ 5 @Override 6 public String... 阅读全文
摘要:
/index.jsp 阅读全文
摘要:
如何在项目中使用Strust2呢?一、准备步骤 下载Struts2的类库 下载完成后解压,下面是解压完成后的目录 apps:示例程序 docs: 文档 lib:类库 src:源码二、搭建开发环境 1.首先在MyEclipse中创建一个web项目:Struts2_Hello 2.导... 阅读全文