//action
package org.kyle.action;
import com.googlecode.jsonplugin.annotations.JSON;
import com.opensymphony.xwork2.ActionSupport;
public class GetJsonData extends ActionSupport{
private String price;
private String name;
@JSON
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String execute() throws Exception {
name="the book of ext";
price="20.00";
return SUCCESS;
}
}
//struts.xml