1 <%@ page info="a hello world example" %>
2 <%@ page import="java.util.*,java.text.*"%>
6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
7 <link rel="stylesheet" href="styles/springsource.css" type="text/css" />
8 <title>Hello OSGi World</title>
12 <div id="main_wrapper">
13 <h1>Hello <%=request.getRemoteAddr()%>, from OSGi World!</h1>
14 <p>This JSP page (if properly compiled), should display various information about the current HTTP session.
16 <h2>HTTP Session info</h2>
19 Format formatter = DateFormat.getDateTimeInstance();
23 <tr><td>Id: </td><td><%=session.getId()%></td></tr>
24 <tr><td>Creation Date:</td><td><%=formatter.format(new Date(session.getCreationTime()))%></td></tr>
25 <tr><td>MaxInactiveInterval:</td><td><%=session.getMaxInactiveInterval()%> sec </td></tr>
27 <h3>Session Attributes</h3>
29 <tr><th>Name</th><th>Value</th></tr>
32 for (Enumeration attributeNames = session.getAttributeNames(); attributeNames.hasMoreElements();) {
33 String attributeName = (String) attributeNames.nextElement();
34 Object attributeValue = session.getAttribute(attributeName);
36 <tr><td><%=attributeName%></td><td><%=attributeValue%></td></tr>
43 <table class="footer">
45 <td><a href="./">Home</a></td>
46 <td align="right"><img src="./images/springsource-logo.png"/></td>