Advertisement
Guest User

Untitled

a guest
Oct 26th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.71 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. To change this license header, choose License Headers in Project Properties.
  4. To change this template file, choose Tools | Templates
  5. and open the template in the editor.
  6. -->
  7. <!DOCTYPE html>
  8. <html xmlns="http://www.w3.org/1999/xhtml">
  9.     <head>
  10.         <title>First Site </title>
  11.         <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  12.     </head>
  13.     <body>
  14.         <div>Welcome to JavaServer Faces #{alaa.Uname}</div>
  15.     </body>
  16. </html>
  17. ---------------------------------
  18. package alaa;
  19.  
  20. import javax.inject.Named;
  21. import javax.enterprise.context.SessionScoped;
  22. import java.io.Serializable;
  23.  
  24.  
  25. @Named(value = "alaa")
  26. @SessionScoped
  27. public class alaa implements Serializable {
  28.  
  29.     String Uname;
  30.     String Pass;
  31.     public alaa() {
  32.     }
  33.  
  34.     public String getUname() {
  35.         return Uname;
  36.     }
  37.  
  38.     public void setUname(String Uname) {
  39.         this.Uname = Uname;
  40.     }
  41.  
  42.     public String getPass() {
  43.         return Pass;
  44.     }
  45.  
  46.     public void setPass(String Pass) {
  47.         this.Pass = Pass;
  48.     }
  49.    
  50.    
  51.    
  52. }
  53. ---------------------------------
  54. <?xml version='1.0' encoding='UTF-8' ?>
  55. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  56. <html xmlns="http://www.w3.org/1999/xhtml"
  57.       xmlns:h="http://xmlns.jcp.org/jsf/html">
  58.     <h:head>
  59.         <title>Login</title>
  60.     </h:head>
  61.     <h:body>
  62.         <h:form>
  63.         UserName:<h:inputText value="#{alaa.Uname}"/><br />
  64.         Password:<h:inputSecret value="#{alaa.Pass}"/><br />
  65.         <h:commandButton value="submit" action="welcome.xhtml"/>
  66.      </h:form>
  67.     </h:body>
  68. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement