let us start using struts
[mir.git] / etc / web.xml
index 42b5798..db47a25 100755 (executable)
@@ -1,10 +1,30 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 
 <!DOCTYPE web-app
-    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
-    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.//EN"
+    "http://java.sun.com/dtd/web-app_2_3.dtd">
 
 <web-app>
+
+       <servlet>
+               <servlet-name>presentation</servlet-name>
+               <servlet-class>mir.core.ui.servlet.TemplateServlet</servlet-class>
+       </servlet>
+       <servlet-mapping>
+               <servlet-name>presentation</servlet-name>
+               <url-pattern>*.shtml</url-pattern>
+       </servlet-mapping>
+       
+       <servlet>
+               <servlet-name>action</servlet-name>
+               <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
+        <init-param>
+               <param-name>config</param-name>
+               <param-value>/WEB-INF/etc/struts-config.xml</param-value>
+        </init-param>
+               <load-on-startup>1</load-on-startup>
+       </servlet>
+       
     <servlet>
         <servlet-name>
             Mir
         <url-pattern>/servlet/OpenMir</url-pattern>
     </servlet-mapping>
 
+       <filter>
+               <filter-name>authentication</filter-name>
+               <filter-class>mir.core.ui.filter.AuthenticationFilter</filter-class>    
+       </filter>
+       
+       <filter-mapping>
+               <filter-name>authentication</filter-name>
+               <servlet-name>presentation</servlet-name>
+       </filter-mapping>
     <mime-mapping>
       <extension>
         mp3 
         application/pdf
       </mime-type>
     </mime-mapping>
-
-    <security-constraint>
-      <web-resource-collection>
-         <web-resource-name>Protected Area</web-resource-name>
-        <!-- Define the context-relative URL(s) to be protected -->
-         <url-pattern>/jsp/security/protected/*</url-pattern>
-        <!-- If you list http methods, only those methods are protected -->
-        <http-method>DELETE</http-method>
-         <http-method>GET</http-method>
-         <http-method>POST</http-method>
-        <http-method>PUT</http-method>
-      </web-resource-collection>
-      <auth-constraint>
-         <!-- Anyone with one of the listed roles may access this area -->
-         <role-name>tomcat</role-name>
-        <role-name>role1</role-name>
-      </auth-constraint>
-    </security-constraint>
-
-    <!-- Default login configuration uses BASIC authentication -->
-    <!--
-    <login-config>
-      <auth-method>BASIC</auth-method>
-      <realm-name>Example Basic Authentication Area</realm-name>
-    </login-config>
-    -->
-
-    <!-- Form-based login is enabled by default.  If you wish to
-         try Basic authentication, comment out the <login-config>
-         section below and uncomment the one above. -->
-    <login-config>
-      <auth-method>FORM</auth-method>
-      <realm-name>Example Form-Based Authentication Area</realm-name>
-      <form-login-config>
-        <form-login-page>/jsp/security/login/login.jsp</form-login-page>
-        <form-error-page>/jsp/security/login/error.jsp</form-error-page>
-      </form-login-config>
-    </login-config>
-
-</web-app>
+</web-app>
\ No newline at end of file