package com.test1;
import org.apache.struts2.convention.annotation.Result;
import com.opensymphony.xwork2.ActionSupport;
@Result( value="/HelloWorld.jsp",name="SUCCESS")
public class HelloWorld extends ActionSupport {
private static final String GREETING="Hello";
public String execute(){
setCustomGreeting(GREETING+" "+getName());
return "SUCCESS";
}
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCustomGreeting() {
return customGreeting;
}
public void setCustomGreeting(String customGreeting) {
this.customGreeting = customGreeting;
}
private String customGreeting;
}