[Commits] (bcm) add a server signature to each cosmo web page (excluding webdav-generated

commits at osafoundation.org commits at osafoundation.org
Fri Apr 8 13:04:52 PDT 2005


Commit by: bcm
Modified files:
server/build.xml 1.25 1.26
server/core/etc/applicationContext-base.xml 1.1 1.2
server/core/etc/chandler.properties 1.3 1.4
server/docs/TODO.txt 1.43 1.44
server/web/etc/MessageResources.properties 1.2 1.3
server/web/web/cosmo.js None 1.1
server/web/web/spacer.gif None 1.1
server/web/web/chandler.css 1.1 1.2
server/web/web/WEB-INF/jsp/layout.jsp 1.2 1.3

Log message:
add a server signature to each cosmo web page (excluding webdav-generated
directory indexes for now) containing the current date/time and the server
version number. ex: "Cosmo sharing server v 0.1   Apr 8, 2005 12:58:49 PM"

make the version number available to the application by 1) adding it to the
server's properties file during packaging and 2) using spring to pull it from
the properties file into a servlet context attribute "cosmoVersion".


Bugzilla links:
http://bugzilla.osafoundation.org/show_bug.cgi?id=2005

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/server/build.xml.diff?r1=text&tr1=1.25&r2=text&tr2=1.26
http://cvs.osafoundation.org/index.cgi/server/core/etc/applicationContext-base.xml.diff?r1=text&tr1=1.1&r2=text&tr2=1.2
http://cvs.osafoundation.org/index.cgi/server/core/etc/chandler.properties.diff?r1=text&tr1=1.3&r2=text&tr2=1.4
http://cvs.osafoundation.org/index.cgi/server/docs/TODO.txt.diff?r1=text&tr1=1.43&r2=text&tr2=1.44
http://cvs.osafoundation.org/index.cgi/server/web/etc/MessageResources.properties.diff?r1=text&tr1=1.2&r2=text&tr2=1.3
http://cvs.osafoundation.org/index.cgi/server/web/web/cosmo.js?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.osafoundation.org/index.cgi/server/web/web/spacer.gif?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.osafoundation.org/index.cgi/server/web/web/chandler.css.diff?r1=text&tr1=1.1&r2=text&tr2=1.2
http://cvs.osafoundation.org/index.cgi/server/web/web/WEB-INF/jsp/layout.jsp.diff?r1=text&tr1=1.2&r2=text&tr2=1.3

Index: server/core/etc/applicationContext-base.xml
diff -u server/core/etc/applicationContext-base.xml:1.1 server/core/etc/applicationContext-base.xml:1.2
--- server/core/etc/applicationContext-base.xml:1.1	Thu Mar 17 19:26:16 2005
+++ server/core/etc/applicationContext-base.xml	Fri Apr  8 13:04:49 2005
@@ -14,4 +14,15 @@
     </property>
   </bean>
 
+  <bean
+     class="org.springframework.web.context.support.ServletContextAttributeExporter">
+    <property name="attributes">
+      <map>
+        <entry key="cosmoVersion">
+          <value>${cosmo.version}</value>
+        </entry>
+      </map>
+    </property>
+  </bean>
+
 </beans>

Index: server/build.xml
diff -u server/build.xml:1.25 server/build.xml:1.26
--- server/build.xml:1.25	Thu Apr  7 12:31:19 2005
+++ server/build.xml	Fri Apr  8 13:04:49 2005
@@ -290,12 +290,19 @@
       </fileset>
       <fileset dir="${core.etc}">
         <include name="*.xml"/>
-        <include name="*.properties"/>
       </fileset>
       <fileset dir="${core.build}/classes">
         <include name="hibernate.cfg.xml"/>
       </fileset>
     </copy>
+    <copy todir="${chsrv.dist.tomcat}/common/classes">
+      <fileset dir="${core.etc}">
+        <include name="chandler.properties"/>
+      </fileset>
+      <filterset>
+        <filter token="VERSION" value="${chsrv.version}"/>
+      </filterset>
+    </copy>
     <copy todir="${chsrv.dist.tomcat}/common/lib"
           file="${core.build}/chandler-server-core.jar"/>
     <copy todir="${chsrv.dist.tomcat}/common/lib"

Index: server/core/etc/chandler.properties
diff -u server/core/etc/chandler.properties:1.3 server/core/etc/chandler.properties:1.4
--- server/core/etc/chandler.properties:1.3	Mon Mar 28 10:47:01 2005
+++ server/core/etc/chandler.properties	Fri Apr  8 13:04:49 2005
@@ -2,14 +2,25 @@
 #
 # the base URL and user credentials for the Slide server
 #
-cosmo.slide.base.url=http://localhost:8080/share/
-cosmo.slide.base.username=root
-cosmo.slide.base.password=chsrv
+cosmo.slide.base.url      = http://localhost:8080/share/
+cosmo.slide.base.username = root
+cosmo.slide.base.password = chsrv
 
 #
 # the JNDI location of an existing JCR repository, and whether or not
 # it is bound as a J2EE resource ref (in this case the JNDI name is
 # relative to java:comp/env/).
 #
-cosmo.jcr.jndi.name=jcr/repositoryFactory
-cosmo.jcr.jndi.resourceRef=true
+cosmo.jcr.jndi.name        = jcr/repositoryFactory
+cosmo.jcr.jndi.resourceRef = true
+
+#
+# -------------------------------------------------
+# YOU SHOULD NOT NEED TO CHANGE ANYTHING BELOW HERE
+# -------------------------------------------------
+#
+
+#
+# the cosmo version number
+
+cosmo.version = @VERSION@

Index: server/docs/TODO.txt
diff -u server/docs/TODO.txt:1.43 server/docs/TODO.txt:1.44
--- server/docs/TODO.txt:1.43	Fri Apr  8 11:22:00 2005
+++ server/docs/TODO.txt	Fri Apr  8 13:04:49 2005
@@ -2,10 +2,8 @@
 0.1 RELEASE
 ===========
 
- * add server signature to all page footers
  * try putting all stuff from tomcat's common/lib and common/classes
    back into the single webapp
- * rename "web" subproject to something better
  * remove console and webdav webapps
  * remove slide
 
@@ -16,8 +14,7 @@
 
  * make new module 'cosmo'
  * use maven
- * move console webapp into a webui subproject
- * move webdav webapp into a webdav subproject
+ * rename "web" subproject to something better
  * change all packages from org.osaf.chandler.server to org.osaf.cosmo
  * precompile jsps for distribution
 

Index: server/web/web/chandler.css
diff -u server/web/web/chandler.css:1.1 server/web/web/chandler.css:1.2
--- server/web/web/chandler.css:1.1	Wed Apr  6 20:15:02 2005
+++ server/web/web/chandler.css	Fri Apr  8 13:04:50 2005
@@ -38,6 +38,13 @@
 font-family: Georgia, Times Old Roman, Times, serif;
 }
 
+.footer {
+font-size:
+10px; font-style: italic;
+color: #000; 
+font-family: Georgia, Times Old Roman, Times, serif;
+}
+
 .inlinecodeblock {
 font-family: monospace;
 white-space: pre;

Index: server/web/etc/MessageResources.properties
diff -u server/web/etc/MessageResources.properties:1.2 server/web/etc/MessageResources.properties:1.3
--- server/web/etc/MessageResources.properties:1.2	Thu Apr  7 17:14:43 2005
+++ server/web/etc/MessageResources.properties	Fri Apr  8 13:04:49 2005
@@ -6,6 +6,7 @@
 Layout.Nav.Main.LogOut=Log out
 Layout.Nav.Console.Label=Admin console:
 Layout.Nav.Console.Users=Users
+Layout.Footer=Cosmo sharing server v {0}
 
 Button.Go=Go
 Button.Cancel=Cancel

Index: server/web/web/WEB-INF/jsp/layout.jsp
diff -u server/web/web/WEB-INF/jsp/layout.jsp:1.2 server/web/web/WEB-INF/jsp/layout.jsp:1.3
--- server/web/web/WEB-INF/jsp/layout.jsp:1.2	Thu Apr  7 17:14:44 2005
+++ server/web/web/WEB-INF/jsp/layout.jsp	Fri Apr  8 13:04:50 2005
@@ -21,6 +21,8 @@
     </title>
     <link rel="stylesheet" type="text/css"
           href="<html:rewrite page="/chandler.css"/>"/>
+    <script type="text/javascript"
+            src="<html:rewrite page="/cosmo.js"/>"></script>
   </head>
   <body class="bodystyle">
     <table border="0" cellpadding="0" cellspacing="0" width="100%">
@@ -72,5 +74,21 @@
       <tiles:insert attribute="body" flush="false"/>
       <!-- end page body -->
     </div>
+    <!-- footer -->
+    <html:img page="/spacer.gif" width="1" height="60" alt=""
+              border="0" styleId="footerSpacer"/>
+    <hr noshade="noshade"/>
+    <div class="footer">
+      <fmt:message key="Layout.Footer">
+        <fmt:param value="${applicationScope.cosmoVersion}"/>
+      </fmt:message>
+      <jsp:useBean id="now" class="java.util.Date"/>
+      &nbsp;&nbsp;&nbsp;
+      <fmt:formatDate value="${now}" type="both"/>
+    </div>
+    <script language="JavaScript" type="text/javascript">
+      setFoot();
+    </script>
+    <!-- end footer -->
   </body>
 </html:html>



More information about the Commits mailing list