Advertisement
Guest User

index.jsp

a guest
Sep 19th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.07 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  2.     pageEncoding="ISO-8859-1"%>
  3. <!DOCTYPE html>
  4. <html>
  5.     <head>
  6.         <%@ include file="header.html" %>
  7.     </head>
  8.     <body>
  9.     <% HttpSession s = request.getSession();
  10.     if((boolean)s.getAttribute("bibliotekar")==true) {%>
  11.         <%@ include file="navbar.html" %>
  12.         <%}else {%>
  13.         <%@ include file="navbarU.html" %>
  14.         <%}
  15.         if(s.getAttribute("email")==null)
  16.         {
  17.             response.sendRedirect("login.jsp");
  18.             System.out.println("Ulogovan! izlog||"+s.getAttribute("email"));
  19.             return;
  20.            
  21.         }
  22.          String email = (String)s.getAttribute("email");
  23.          boolean isBibliotekar = (Boolean)s.getAttribute("bibliotekar");
  24.          String poruka;
  25.          if(isBibliotekar==true)
  26.          {
  27.              poruka="Ulogovan kao bibliotekar.";
  28.              
  29.          }
  30.          else
  31.              poruka="Ulogovan kao korisnik";
  32.          %>
  33.          
  34.          <div class="container" style="width:70%; text-align:center; margin-top:100px;">
  35.             <h1 style="font-size: 3.0rem;">Dobrodosli <%= s.getAttribute("email") %> u nasu biblioteku.</h1>
  36.             <h2>Bla:<%= poruka  %></h2>
  37.        
  38.          </div>
  39.     </body>
  40. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement