KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.opensymphony.webwork.tutorial.ajax;
2
3 import com.opensymphony.xwork.ActionSupport;
4
5 public class HelloWorld extends ActionSupport {
6     private String JavaDoc name;
7     private String JavaDoc message;
8
9     public String JavaDoc doDefault() throws Exception JavaDoc {
10         return INPUT;
11     }
12
13     public String JavaDoc execute() throws Exception JavaDoc {
14         message = "Hello, " + name;
15
16         return SUCCESS;
17     }
18
19     public String JavaDoc getName() {
20         return name;
21     }
22
23     public void setName(String JavaDoc name) {
24         this.name = name;
25     }
26
27     public String JavaDoc getMessage() {
28         return message;
29     }
30
31     public void setMessage(String JavaDoc message) {
32         this.message = message;
33     }
34 }
35
Popular Tags