D:\JavaFrameworks\InsuranceFramework\web\jsp\SessionExample.jsp
 1 <%-- 
 2     Document   : SessionExample
 3     Created on : Aug 11, 2013, 10:07:35 PM
 4     Author     : sameldin
 5 --%>
 6 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"%>
 7 <%@ page import = "constants.Constants"%>
 8 <%@ page import="java.util.ArrayList"%>
 9 <%
10 HttpSession localHttpSession                    = request.getSession(false);
11 localHttpSession.setAttribute("SamtTableSelected","TRUE");
12 UserDOA localUserDOA =
13         (localUserDOA) localHttpSession.getAttribute(Constants.USER_DATA_OBJECT);
14 // Get the Sort Order
15 
16 String  samMessage = (String)request.getAttribute("SamMsg");
17 if(null == samMessage)
18         samMessage = Constants.SORTORDER_MSG_DEFAULT;
19 String lsSortNum  =     samMessage.substring(0, 1);
20 //Get the results from the session.
21 //As of now, I am getting them from the request.
22 ArrayList localResults = (ArrayList) localHttpSession.getAttribute(Constants.SEARCH_MESSAGE_LIST);
23 if(null == localResults)
24         localResults = new ArrayList();
25 String localDisabled = "";
26 if((localResults == null) || (localResults.size() == 0))
27 {
28         localDisabled = "disabled";
29 }
30 //...
31 %>
32 <html>
33 <head>
34 <title>Sam Template Session : Examples</title>
35 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
36 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
37    "http://www.w3.org/TR/html4/loose.dtd">
38 <link rel="stylesheet" href="<%=constants.Constants.MY_CSS_PATH + "standard.css"%>" type="text/css">
39 <script language="javascript" src="<%=constants.Constants.XYZ_JS_PATH + "date-picker.js"%>"></script>
40 <script language="javascript" src="<%=constants.Constants.XYZ_JS_PATH + "MsgMkr.js"%>"></script>
41 <script>
42 </script>
43 
44 
45 <html>
46     <head>
47         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
48         <title>JSP Page</title>
49     </head>
50     <body>
51         <h1>Hello World!</h1>
52     </body>
53 </html>
54 
55