Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Awesome to-do list</title>
- </head>
- <style>
- body {
- font-family: Lucida Console, Helvetica, sans-serif;
- position: relative;
- border-radius: 5px;
- background-color: #f2f2f2;
- padding: 20px 0 30px 0;
- text-align: center;
- }
- * {
- box-sizing: border-box;
- }
- </style>
- <body>
- <h1 style="text-align:center; color: rgb(153, 0, 61);">Awesome to-do list</h1>
- <!-- For testing purpose, setting value into the java bean -->
- <jsp:useBean id="userbean" class="com.awesometodo.model.UserBean" scope="session"/>
- <!-- testing code end -->
- <!-- reading attributes from Java Bean. getProperty will automatically call
- the getter method for the selected property. You will get an error message
- if the getter method is not available -->
- <p>
- <!-- if user already logged in, they will be userinfo bean in the session object.
- check if that exist.-->
- <c:if test="${not empty userinfo}">
- <p>
- Hi ${userinfo.fullName}!.
- Hope you have a productive day today :-)
- </p>
- <small>
- You logged in as ${userinfo.username}.
- <a href="Logout">Logout</a>
- </small>
- </c:if>
- <c:if test="${empty userinfo}">
- <small>
- You are not logged in.
- <a href="login.jsp">Login</a>
- </small>
- </c:if>
- </p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement