Advertisement
Guest User

Untitled

a guest
Apr 18th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <?xml version="1.0" encoding="ISO-8859-1" ?>
  2. <f:view xmlns:f="http://java.sun.com/jsf/core"
  3. xmlns:h="http://java.sun.com/jsf/html"
  4. xmlns:ice="http://www.icesoft.com/icefaces/component">
  5. <ice:outputDeclaration doctypeRoot="HTML"
  6. doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
  7. doctypeSystem="http://www.w3.org/TR/html4/loose.dtd"/>
  8. <html>
  9. <head>
  10. <title>Spring Security Login</title>
  11. </head>
  12. <body>
  13. <ice:form partialSubmit="false">
  14. <ice:panelGrid columns="2">
  15. <ice:outputLabel value="User Name" for="j_username"/>
  16. <ice:inputText id="j_username"
  17. value="#{loginBean.userId}" size="40"
  18. maxlength="80"/>
  19. <ice:outputLabel value="Password" for="j_password"/>
  20. <ice:inputSecret id="j_password"
  21. value="#{loginBean.password}" size="40"
  22. maxlength="80"/>
  23. </ice:panelGrid>
  24. <ice:commandButton actionListener="#{loginBean.login}" value="Login"/>
  25. <ice:messages style="color: red;"/>
  26. </ice:form>
  27. </body>
  28. </html>
  29. </f:view>
  30.  
  31. public void login(ActionEvent e) throws java.io.IOException {
  32. FacesContext.getCurrentInstance().getExternalContext().redirect("/spring-authentication/j_spring_security_check?j_username=" + userId + "&j_password=" + password);
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement