%@ page info="a hello world example" %>
<%@ page import="java.util.*,java.text.*"%>
Hello <%=request.getRemoteAddr()%>, from OSGi World!
This JSP page (if properly compiled), should display various information about the current HTTP session.
HTTP Session info
<%
Format formatter = DateFormat.getDateTimeInstance();
%>
Id: | <%=session.getId()%> |
Creation Date: | <%=formatter.format(new Date(session.getCreationTime()))%> |
MaxInactiveInterval: | <%=session.getMaxInactiveInterval()%> sec |
Session Attributes
Name | Value |
<%
for (Enumeration attributeNames = session.getAttributeNames(); attributeNames.hasMoreElements();) {
String attributeName = (String) attributeNames.nextElement();
Object attributeValue = session.getAttribute(attributeName);
%>
<%=attributeName%> | <%=attributeValue%> |
<%
}
%>