/web/Test/src/com/jackhatedance/test/struts2/HelloWorld.java

http://drcp.googlecode.com/ · Java · 33 lines · 24 code · 9 blank · 0 comment · 0 complexity · ad9341b96b447c9c48ed56f51f208bd6 MD5 · raw file

  1. package com.jackhatedance.test.struts2;
  2. import com.opensymphony.xwork2.ActionSupport;
  3. public class HelloWorld extends ActionSupport {
  4. public static final String MESSAGE = "Struts is up and running ....";
  5. public String execute() throws Exception {
  6. setMessage(MESSAGE);
  7. setWho("jack");
  8. return SUCCESS;
  9. }
  10. private String message;
  11. private String who;
  12. public void setMessage(String message){
  13. this.message = message;
  14. }
  15. public String getMessage() {
  16. return message;
  17. }
  18. public String getWho() {
  19. return who;
  20. }
  21. public void setWho(String who) {
  22. this.who = who;
  23. }
  24. }