Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- To change this license header, choose License Headers in Project Properties.
- To change this template file, choose Tools | Templates
- and open the template in the editor.
- -->
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>First Site </title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
- </head>
- <body>
- <div>Welcome to JavaServer Faces #{alaa.Uname}</div>
- </body>
- </html>
- ---------------------------------
- package alaa;
- import javax.inject.Named;
- import javax.enterprise.context.SessionScoped;
- import java.io.Serializable;
- @Named(value = "alaa")
- @SessionScoped
- public class alaa implements Serializable {
- String Uname;
- String Pass;
- public alaa() {
- }
- public String getUname() {
- return Uname;
- }
- public void setUname(String Uname) {
- this.Uname = Uname;
- }
- public String getPass() {
- return Pass;
- }
- public void setPass(String Pass) {
- this.Pass = Pass;
- }
- }
- ---------------------------------
- <?xml version='1.0' encoding='UTF-8' ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://xmlns.jcp.org/jsf/html">
- <h:head>
- <title>Login</title>
- </h:head>
- <h:body>
- <h:form>
- UserName:<h:inputText value="#{alaa.Uname}"/><br />
- Password:<h:inputSecret value="#{alaa.Pass}"/><br />
- <h:commandButton value="submit" action="welcome.xhtml"/>
- </h:form>
- </h:body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement