%-- emailDemo.jsp --%>
<%-- is used for displaying student email list --%>
<%-- Jeff Offutt, Fall 2001 --%>
<%-- This is the demo version - not what I use. --%>
<%
// Check if user has logged in.
// This works with the login servlet. If the user has already logged in,
// the jsp is executed normally. Otherwise, the user is fotwared to the
// login servlet.
session = request.getSession (false);
//from loginDemo.java: session.setAttribute ("isLogin", "Yes");
if (session != null)
{ // A session exists
String isLoginStr = (String) session.getAttribute ("isLogin");
boolean isLogin = (isLoginStr != null && isLoginStr.equals ("Yes"));
if (!isLogin)
{
%> <%
}
}
%>
Student Email List
Student Email List
<% infoDemo.loadInfo(); %>
Email | Name |
<% for(int i=0; i
<% String s = infoDemo.getEmailAddress(i).replace('\r', ',').replace('\n', ' '); %>
<%= s %> |
<%-- Cosmetic change, print last name, first name. --%>
(<%=infoDemo.getLName(i)%>, <%=infoDemo.getFName(i)%>) |
<% } %>