detect logged in user

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@950978 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2010-06-03 12:33:16 +00:00
parent a89c57d229
commit df01babdcf
2 changed files with 7 additions and 4 deletions

View File

@ -71,8 +71,6 @@
%>
%>
<!-- Header division displays the title and right-justified current user name -->
<!-- and a Shopping Cart icon for active sessions -->
<div id="header">
@ -82,7 +80,7 @@
hspace="2em"/>
&nbsp;&nbsp;<A HREF="."><span style="font-size: 24pt">OpenBooks</span></A>
<%
Object currentUser = session.getAttribute("user");
Object currentUser = session.getAttribute(KEY_USER);
boolean activeSession = currentUser != null;
if (activeSession) {
%>

View File

@ -50,6 +50,7 @@ corresponding Java code</a> executed on the server side.
<div id="content" style="display: block">
<%
Object service = session.getAttribute(KEY_SERVICE);
if (service == null) {
%>
<A name="login"></A>
@ -64,7 +65,11 @@ corresponding Java code</a> executed on the server side.
width="111px" height="22px" border="0">
</form>
<%
}
} else {
%>
You have already signed in, <%= session.getAttribute(KEY_USER) %>.
<%
}
%>
</div>