SHARE
TWEET

Untitled

a guest Mar 20th, 2016 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <validators>
  2. <field name="userName">
  3. <field-validator type="requiredstring">
  4. <message>User Name is required.</message>
  5. </field-validator>
  6. </field>
  7. <field name="password">
  8. <field-validator type="requiredstring">
  9. <message key="password.required" />
  10. </field-validator>
  11. </field>
  12. </validators>
  13.    
  14. public class Login extends ActionSupport {
  15.  
  16. private String userName;
  17. private String password;
  18.  
  19. public Login() {
  20. }
  21.  
  22. public String execute() {
  23. return SUCCESS;
  24. }
  25.  
  26. public String getUserName() {
  27. return userName;
  28. }
  29.  
  30. public void setUserName(String userName) {
  31. this.userName = userName;
  32. }
  33.  
  34. public String getPassword() {
  35. return password;
  36. }
  37.  
  38. public void setPassword(String password) {
  39. this.password = password;
  40. }
  41. }
  42.    
  43. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  44. <%@taglib uri="/struts-tags" prefix="s" %>
  45. <html>
  46. <head>
  47. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  48. <title>Login Page</title>
  49. <s:head />
  50. </head>
  51. <body>
  52. <s:form action="LoginAction">
  53. <s:textfield name="userName" label="User Name" />
  54. <s:password name="password" label="Password" />
  55. <s:submit value="Login" />
  56. </s:form>
  57. </body>
  58. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top