package tutorial;
import java.util.ArrayList;
import java.util.List;
import com.googlecode.jsonplugin.annotations.JSON;
import com.opensymphony.xwork2.ActionSupport;
public class JsonPluginAction extends ActionSupport {
private int bookId;
private String title;
private double price;
private List comments=new ArrayList();;
private transient String secret1;
private String secret2;
@JSON(name="ISBN")
public int getBookId() {
return bookId;
}
public void setBookId(int bookId) {
this.bookId = bookId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public List getComments() {
return comments;
}
public void setComments(List comments) {
this.comments = comments;
}
public String getSecret1() {
return secret1;
}
public void setSecret1(String secret1) {
this.secret1 = secret1;
}
public String getSecret2() {
return secret2;
}
@Override
public String execute() throws Exception {
bookId=1234567;
title="how are you";
price=12.5;
comments.add("经济改革");
comments.add("社会变更");
comments.add("人文风俗");
secret1="It is very nice to meet you";
secret2="I love you!";
return "success";
}
public void setSecret2(String secret2) {
this.secret2 = secret2;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
ajax利用json在struts2.0中的使用
共19个文件
jar:6个
xml:3个
js:1个
需积分: 3 81 下载量 197 浏览量
2008-08-26
17:02:53
上传
评论
收藏 3.16MB RAR 举报
温馨提示
本项目使用ajax 利用json在struts2.0传输数据
资源推荐
资源详情
资源评论
收起资源包目录
jsonApply.rar (19个子文件)
jsonApply
.project 1KB
.mymetadata 300B
WebRoot
WEB-INF
web.xml 626B
lib
struts2-core-2.0.8.jar 2.1MB
ognl-2.6.11.jar 164KB
commons-logging-api-1.1.jar 44KB
freemarker-2.3.8.jar 784KB
xwork-2.0.3.jar 447KB
jsonplugin-0.30.jar 43KB
classes
tutorial
JsonPluginAction.class 2KB
struts.xml 529B
index.jsp 565B
META-INF
MANIFEST.MF 39B
js
ajax_func.js 2KB
index.html 1KB
index.flt 657B
.myeclipse
src
tutorial
JsonPluginAction.java 1KB
struts.xml 529B
.classpath 812B
共 19 条
- 1
资源评论
starryxin
- 粉丝: 11
- 资源: 22
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功