openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r950978 - in /openjpa/trunk/openjpa-examples/openbooks/web: header.jsp intro.jsp
Date Thu, 03 Jun 2010 12:33:16 GMT
Author: ppoddar
Date: Thu Jun  3 12:33:16 2010
New Revision: 950978

URL: http://svn.apache.org/viewvc?rev=950978&view=rev
Log:
detect logged in user

Modified:
    openjpa/trunk/openjpa-examples/openbooks/web/header.jsp
    openjpa/trunk/openjpa-examples/openbooks/web/intro.jsp

Modified: openjpa/trunk/openjpa-examples/openbooks/web/header.jsp
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/web/header.jsp?rev=950978&r1=950977&r2=950978&view=diff
==============================================================================
--- openjpa/trunk/openjpa-examples/openbooks/web/header.jsp (original)
+++ openjpa/trunk/openjpa-examples/openbooks/web/header.jsp Thu Jun  3 12:33:16 2010
@@ -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) {
 %>

Modified: openjpa/trunk/openjpa-examples/openbooks/web/intro.jsp
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/web/intro.jsp?rev=950978&r1=950977&r2=950978&view=diff
==============================================================================
--- openjpa/trunk/openjpa-examples/openbooks/web/intro.jsp (original)
+++ openjpa/trunk/openjpa-examples/openbooks/web/intro.jsp Thu Jun  3 12:33:16 2010
@@ -50,6 +50,7 @@ corresponding Java code</a> executed on 
 <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 
                width="111px" height="22px" border="0">
       </form>
 <%
-    } 
+    } else { 
+%>
+     You have already signed in, <%= session.getAttribute(KEY_USER) %>.
+<%
+    }
 %>
 </div>
 



Mime
View raw message