[Bedework-commit] carddav r270 - in trunk: . server/war/WEB-INF

svnadmin at bedework.org svnadmin at bedework.org
Wed Jul 27 15:06:03 EDT 2011


Author: douglm
Date: 2011-07-27 15:06:01 -0400 (Wed, 27 Jul 2011)
New Revision: 270

Added:
   trunk/server/war/WEB-INF/webuserweb.xml
Modified:
   trunk/build.xml
Log:
Configure and build a "web" version of CardDAV - this doesn't invalidate sessions and has longer timeout and may work with a CAS filter

Modified: trunk/build.xml
===================================================================
--- trunk/build.xml	2011-06-24 17:49:02 UTC (rev 269)
+++ trunk/build.xml	2011-07-27 19:06:01 UTC (rev 270)
@@ -181,6 +181,35 @@
         </ant>
       </sequential>
     </forApp>
+    
+    <if>
+      <istrue value="${org.bedework.global.carddav.web.version}" />
+      <then>
+	    <!-- =================================================================
+	         Build the authenticated war - web version
+	         ================================================================= -->
+	    
+	    <forApp name="usercarddavweb"
+	            prefix="org.bedework.deploy"
+	            appPrefix="org.bedework.app"
+	            projectPrefix="org.bedework.project">
+	      <sequential>
+	        <property name="app.sou.dir"
+	                  location="${org.bedework.deploy.app.sou}" />
+	      
+	        <propertyset id="deploy-user-app-properties">
+	          <propertyref prefix="org.bedework.app.${org.bedework.deploy.name}"/>
+	          <globmapper from="org.bedework.app.${org.bedework.deploy.name}.*" 
+	                      to="propval.app.*"/>
+	        </propertyset>
+	      
+	        <ant antfile="${buildwar}" inheritRefs="true" target="build" >
+	          <propertyset refid="deploy-user-app-properties" />
+	        </ant>
+	      </sequential>
+	    </forApp>
+      </then>
+    </if>
 
     <!-- ===============================================================
          Build the unauthenticated war

Added: trunk/server/war/WEB-INF/webuserweb.xml
===================================================================
--- trunk/server/war/WEB-INF/webuserweb.xml	                        (rev 0)
+++ trunk/server/war/WEB-INF/webuserweb.xml	2011-07-27 19:06:01 UTC (rev 270)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+         version="2.4">
+  <display-name>Bedework user caldav</display-name>
+
+  <context-param>
+    <param-name>bwappname</param-name>
+    <param-value>@BW-APP-NAME@</param-value>
+  </context-param>
+
+  <listener>
+    <listener-class>edu.rpi.sss.util.jsp.SessionListener</listener-class>
+  </listener>
+
+  <!-- Need this to flush a static table maintained by the servlet -->
+  <listener>
+    <listener-class>org.bedework.carddav.server.CarddavServlet</listener-class>
+  </listener>
+
+  <servlet>
+    <servlet-name>action</servlet-name>
+    <servlet-class>
+      org.bedework.carddav.server.CarddavServlet
+    </servlet-class>
+    <init-param>
+      <param-name>application</param-name>
+      <param-value>servlet</param-value>
+    </init-param>
+    <init-param>
+      <param-name>web-version</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    <init-param>
+      <param-name>dumpContent</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    <init-param>
+      <param-name>debug</param-name>
+      <param-value>@RPI-DEBUG@</param-value>
+    </init-param>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>action</servlet-name>
+    <url-pattern>/</url-pattern>
+  </servlet-mapping>
+
+  <session-config>
+    <session-timeout>30</session-timeout>
+  </session-config>
+
+  <!-- JDBC DataSources (java:comp/env/jdbc) -->
+  <resource-ref>
+    <description>The calendar DS</description>
+    <res-ref-name>jdbc/cardDB</res-ref-name>
+    <res-type>javax.sql.DataSource</res-type>
+    <res-auth>Container</res-auth>
+  </resource-ref>
+
+  <!-- The role name of * below means all roles defined in this web.xml -->
+  <security-constraint>
+    <web-resource-collection>
+      <web-resource-name>Bedework</web-resource-name>
+      <description>Bedework user</description>
+      <url-pattern>/*</url-pattern>
+    </web-resource-collection>
+    <auth-constraint>
+      <role-name>*</role-name>
+    </auth-constraint>
+    <user-data-constraint>
+      <description>no description</description>
+      <transport-guarantee>NONE</transport-guarantee>
+    </user-data-constraint>
+  </security-constraint>
+
+  <login-config>
+    <auth-method>BASIC</auth-method>
+    <realm-name>@SECURITY-DOMAIN@</realm-name>
+  </login-config>
+
+  <security-role>
+    <description>A calendar system user</description>
+    <role-name>@SECURITY-PREFIX at .user</role-name>
+  </security-role>
+
+  <!-- Insert ejb-ref here -->
+</web-app>



More information about the Bedework-commit mailing list