cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@cocoon.apache.org
Subject [Cocoon Wiki] Updated: CocoonAndHibernateTutorial
Date Mon, 29 Nov 2004 10:58:07 GMT
   Date: 2004-11-29T02:58:07
   Editor: JohannesTextor <jc.textor@gmx.de>
   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 ===

Mime
View raw message