Advertisement
Sharishah97

Index page

Nov 8th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  2. pageEncoding="ISO-8859-1"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  8. <title>Awesome to-do list</title>
  9. </head>
  10. <style>
  11. body {
  12. font-family: Lucida Console, Helvetica, sans-serif;
  13. position: relative;
  14. border-radius: 5px;
  15. background-color: #f2f2f2;
  16. padding: 20px 0 30px 0;
  17. text-align: center;
  18. }
  19.  
  20. * {
  21. box-sizing: border-box;
  22. }
  23. </style>
  24. <body>
  25. <h1 style="text-align:center; color: rgb(153, 0, 61);">Awesome to-do list</h1>
  26.  
  27. <!-- For testing purpose, setting value into the java bean -->
  28. <jsp:useBean id="userbean" class="com.awesometodo.model.UserBean" scope="session"/>
  29.  
  30. <!-- testing code end -->
  31.  
  32. <!-- reading attributes from Java Bean. getProperty will automatically call
  33. the getter method for the selected property. You will get an error message
  34. if the getter method is not available -->
  35. <p>
  36. <!-- if user already logged in, they will be userinfo bean in the session object.
  37. check if that exist.-->
  38. <c:if test="${not empty userinfo}">
  39. <p>
  40. Hi ${userinfo.fullName}!.
  41. Hope you have a productive day today :-)
  42. </p>
  43. <small>
  44. You logged in as ${userinfo.username}.
  45. <a href="Logout">Logout</a>
  46. </small>
  47. </c:if>
  48. <c:if test="${empty userinfo}">
  49. <small>
  50. You are not logged in.
  51. <a href="login.jsp">Login</a>
  52. </small>
  53. </c:if>
  54. </p>
  55.  
  56. </body>
  57. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement