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