<%-- result.jsp   P. Conrad  CISC474 Spring 2005  --%>
<%-- P. 87 "Head First Servlets and JSP, 1st Edition, O'Reilly 2004 --%>
<%-- View component of MVC-based beer advisor --%>

<%@ page import="java.util.*" %>

<html>
<body>

<h1 align="center">Schedule Free Times JSP</h1>

<p>

<%-- This gets an attribute from the request object.
     This is a bit mysterious at this point; the book
     promises to explain more later --%>

<% String[] freeTimes = (String[]) request.getAttribute("times");
   String userNames = (String) request.getAttribute("names");
   String start = (String) request.getAttribute("start");
   String finish = (String) request.getAttribute("finish");
   
   out.print("<br />Free times for: " + userNames);

   out.print("<br /><br />Start Time: " + start);
   out.print("<br />End Time: " + finish);
   out.print("<br />");
   
   if(freeTimes[0] != "")
     out.print("<br>Monday: " + freeTimes[0]);
     
   if(freeTimes[1] != "")
     out.print("<br>Tuesday: " + freeTimes[1]);
     
   if(freeTimes[2] != "")
     out.print("<br>Wednesday: " + freeTimes[2]);
     
   if(freeTimes[3] != "")
     out.print("<br>Thursday: " + freeTimes[3]);
     
   if(freeTimes[4] != "")
     out.print("<br>Friday: " + freeTimes[4]);
%>

</body>
</html>

