KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > tutorial > ajax > AjaxTestAction


1 package com.opensymphony.webwork.tutorial.ajax;
2
3 import com.opensymphony.xwork.Action;
4
5
6 /**
7  * @author Ian Roughley
8  * @version $Id: AjaxTestAction.java,v 1.1 2005/08/11 02:40:28 plightbo Exp $
9  */

10 public class AjaxTestAction implements Action {
11
12     private static int counter = 0;
13     private String JavaDoc data;
14
15     public long getServerTime() {
16         return System.currentTimeMillis();
17     }
18
19     public int getCount() {
20         return ++counter;
21     }
22
23     public String JavaDoc getData() {
24         return data;
25     }
26
27     public void setData(String JavaDoc data) {
28         this.data = data;
29     }
30
31     public String JavaDoc execute() throws Exception JavaDoc {
32         return SUCCESS;
33     }
34 }
35
Popular Tags