1 package com.opensymphony.webwork.tutorial.ajax; 2 3 import com.opensymphony.xwork.Action; 4 5 6 10 public class AjaxTestAction implements Action { 11 12 private static int counter = 0; 13 private String data; 14 15 public long getServerTime() { 16 return System.currentTimeMillis(); 17 } 18 19 public int getCount() { 20 return ++counter; 21 } 22 23 public String getData() { 24 return data; 25 } 26 27 public void setData(String data) { 28 this.data = data; 29 } 30 31 public String execute() throws Exception { 32 return SUCCESS; 33 } 34 } 35 | Popular Tags |