mirror of https://github.com/apache/openjpa.git
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:
parent
a89c57d229
commit
df01babdcf
|
@ -71,8 +71,6 @@
|
||||||
|
|
||||||
%>
|
%>
|
||||||
|
|
||||||
%>
|
|
||||||
|
|
||||||
<!-- Header division displays the title and right-justified current user name -->
|
<!-- Header division displays the title and right-justified current user name -->
|
||||||
<!-- and a Shopping Cart icon for active sessions -->
|
<!-- and a Shopping Cart icon for active sessions -->
|
||||||
<div id="header">
|
<div id="header">
|
||||||
|
@ -82,7 +80,7 @@
|
||||||
hspace="2em"/>
|
hspace="2em"/>
|
||||||
<A HREF="."><span style="font-size: 24pt">OpenBooks</span></A>
|
<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;
|
boolean activeSession = currentUser != null;
|
||||||
if (activeSession) {
|
if (activeSession) {
|
||||||
%>
|
%>
|
||||||
|
|
|
@ -50,6 +50,7 @@ corresponding Java code</a> executed on the server side.
|
||||||
<div id="content" style="display: block">
|
<div id="content" style="display: block">
|
||||||
<%
|
<%
|
||||||
Object service = session.getAttribute(KEY_SERVICE);
|
Object service = session.getAttribute(KEY_SERVICE);
|
||||||
|
|
||||||
if (service == null) {
|
if (service == null) {
|
||||||
%>
|
%>
|
||||||
<A name="login"></A>
|
<A name="login"></A>
|
||||||
|
@ -63,6 +64,10 @@ corresponding Java code</a> executed on the server side.
|
||||||
src="images/login.gif"
|
src="images/login.gif"
|
||||||
width="111px" height="22px" border="0">
|
width="111px" height="22px" border="0">
|
||||||
</form>
|
</form>
|
||||||
|
<%
|
||||||
|
} else {
|
||||||
|
%>
|
||||||
|
You have already signed in, <%= session.getAttribute(KEY_USER) %>.
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
|
|
Loading…
Reference in New Issue