Date: 2004-11-29T02:58:07
   Editor: JohannesTextor <[EMAIL PROTECTED]>
   Wiki: Cocoon Wiki
   Page: CocoonAndHibernateTutorial
   URL: http://wiki.apache.org/cocoon/CocoonAndHibernateTutorial

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -322,6 +322,29 @@
 
 === Installing the filter ===
 
+In the file WEB-INF/web.xml, insert the following code avove the "Servlet 
Configuration" part: (as always, insert
+your favourite package name) 
+
+{{{
+<!-- Filter Configuration ========================================== -->
+
+<filter>
+  <filter-name>hibernateFilter</filter-name>
+  <filter-class>org.test.HibernateFilter</filter-class>
+</filter>
+
+<filter-mapping>
+  <filter-name>hibernateFilter</filter-name>
+  <!-- ADAPT the following to suit your needs! Read below -->
+  <url-pattern>/*</url-pattern>
+</filter-mapping>
+}}}
+
+This tells the container to invoke our filter on ALL requests. Of course, 
depending on your application, this is 
+probably overkill since you don't want to create a Hibernate session every 
time your cocoon servlet is serving a 
+GIF image. So please adapt this to suit your needs. For example, you might use 
the url-pattern "*.html". 
+
+
 == Appendix ==
 
 === Links to other information sources ===