added BASIC webapp to build
authormaxcooper <maxcooper>
Mon, 14 Jul 2003 11:43:52 +0000 (11:43 +0000)
committermaxcooper <maxcooper>
Mon, 14 Jul 2003 11:43:52 +0000 (11:43 +0000)
build-webapps.xml
web/basic/WEB-INF/web.xml [new file with mode: 0644]
web/basic/menu.jsp [new file with mode: 0644]

index d8cabe3..24fd574 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 
 <!--
-$Id: build-webapps.xml,v 1.7 2003/06/09 11:27:47 maxcooper Exp $
-$Revision: 1.7 $
-$Date: 2003/06/09 11:27:47 $
+$Id: build-webapps.xml,v 1.8 2003/07/14 11:43:52 maxcooper Exp $
+$Revision: 1.8 $
+$Date: 2003/07/14 11:43:52 $
 -->
 
 <!DOCTYPE project [
@@ -57,6 +57,19 @@ $Date: 2003/06/09 11:27:47 $
       <pathelement location="${web.dir}/example"/>
    </path>
 
+   <!-- ========== basic web app =================================================================================== -->
+
+   <path id="basic.src.path" path="${src.example.dir}"/>
+
+   <fileset id="basic.lib.files" dir="${build.lib.dir}">
+      <patternset refid="common.lib.files"/>
+   </fileset>
+
+   <path id="basic.static.path">
+      <pathelement location="${web.dir}/share"/>
+      <pathelement location="${web.dir}/basic"/>
+   </path>
+
    <!-- ========== catalina web app ================================================================================ -->
 
    <path id="catalina.src.path" refid="example.src.path"/>
@@ -82,6 +95,9 @@ $Date: 2003/06/09 11:27:47 $
          <param name="webapp.name" value="example"/>
       </antcall>
       <antcall target="build-webapp" inheritall="false">
+         <param name="webapp.name" value="basic"/>
+      </antcall>
+      <antcall target="build-webapp" inheritall="false">
          <param name="webapp.name" value="catalina"/>
       </antcall>
    </target>
@@ -95,6 +111,9 @@ $Date: 2003/06/09 11:27:47 $
          <param name="webapp.name" value="example"/>
       </antcall>
       <antcall target="webapp-war" inheritall="false">
+         <param name="webapp.name" value="basic"/>
+      </antcall>
+      <antcall target="webapp-war" inheritall="false">
          <param name="webapp.name" value="catalina"/>
       </antcall>
    </target>
@@ -108,6 +127,9 @@ $Date: 2003/06/09 11:27:47 $
          <property name="webapp.name" value="${project.name}-example"/>
       </ant>
       <ant antfile="deploy.xml" inheritall="false" target="deploy">
+         <property name="webapp.name" value="${project.name}-basic"/>
+      </ant>
+      <ant antfile="deploy.xml" inheritall="false" target="deploy">
          <property name="webapp.name" value="${project.name}-catalina"/>
       </ant>
    </target>
@@ -121,6 +143,9 @@ $Date: 2003/06/09 11:27:47 $
          <property name="webapp.name" value="${project.name}-example"/>
       </ant>
       <ant antfile="deploy.xml" inheritall="false" target="undeploy">
+         <property name="webapp.name" value="${project.name}-basic"/>
+      </ant>
+      <ant antfile="deploy.xml" inheritall="false" target="undeploy">
          <property name="webapp.name" value="${project.name}-catalina"/>
       </ant>
    </target>
diff --git a/web/basic/WEB-INF/web.xml b/web/basic/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..2b55a27
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!DOCTYPE web-app PUBLIC
+   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+   "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+
+   <display-name>SecurityFilter Example Application</display-name>
+
+   <filter>
+      <filter-name>Security Filter</filter-name>
+      <filter-class>org.securityfilter.filter.SecurityFilter</filter-class>
+      <init-param>
+         <param-name>config</param-name>
+         <param-value>/WEB-INF/securityfilter-config.xml</param-value>
+         <description>Configuration file location (this is the default value)</description>
+      </init-param>
+      <init-param>
+         <param-name>validate</param-name>
+         <param-value>true</param-value>
+         <description>Validate config file if set to true</description>
+      </init-param>
+      <init-param>
+         <param-name>loginSubmitPattern</param-name>
+         <param-value>/login</param-value>
+         <description>
+            As an example a login form can define "login" as it action in place of the standard
+            "j_security_check" which is a special flag user by app servers for container managed security.
+         </description>
+      </init-param>
+   </filter>
+
+   <!-- map all requests to the SecurityFilter, control what it does with configuration settings -->
+   <filter-mapping>
+      <filter-name>Security Filter</filter-name>
+      <url-pattern>/*</url-pattern>
+   </filter-mapping>
+
+   <servlet>
+      <servlet-name>NoResponseServlet</servlet-name>
+      <description>For Orion only</description>
+      <servlet-class>org.securityfilter.servlet.NoResponseServlet</servlet-class>
+   </servlet>
+
+   <servlet-mapping>
+      <servlet-name>NoResponseServlet</servlet-name>
+      <url-pattern>/login</url-pattern>
+   </servlet-mapping>
+
+   <!-- make the session time-out after one minute -->
+   <session-config>
+      <session-timeout>1</session-timeout>
+   </session-config>
+
+   <welcome-file-list>
+      <welcome-file>index.jsp</welcome-file>
+   </welcome-file-list>
+
+   <!-- SecurityFilter works with custom error pages -->
+   <error-page>
+      <error-code>403</error-code>
+      <location>/error/403.jsp</location>
+   </error-page>
+
+</web-app>
diff --git a/web/basic/menu.jsp b/web/basic/menu.jsp
new file mode 100644 (file)
index 0000000..50e7111
--- /dev/null
@@ -0,0 +1,7 @@
+<p>
+Navigation Menu: [
+<a href="index.jsp">Home</a>
+| <a href="securePage.jsp">Secure Page</a>
+| <a href="forbiddenPage.jsp">Forbidden Secure Page</a>
+| <a href="logout.jsp">Logout</a>
+]<p>