Advertisement
Guest User

Untitled

a guest
Apr 10th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. package com.larryalcantara.struts2;
  2.  
  3. public class LogInAction {
  4.  
  5. private String username;
  6. private String password;
  7.  
  8. public String execute() {
  9. if(this.username.equals("admin")
  10. && this.password.equals("admin123")) {
  11. return "success";
  12. } else {
  13. return "error";
  14. }
  15. }
  16. public String getUsername() {
  17. return username;
  18. }
  19.  
  20. public void setUsername(String username) {
  21. this.username = username;
  22. }
  23.  
  24. public String getPassword() {
  25. return password;
  26. }
  27. public void setPassword(String password) {
  28. this.password = password;
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement