cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "av@alessandro.vincelli.name" ...@alessandro.vincelli.name>
Subject [2.2] XPatch web.xml
Date Thu, 12 Jun 2008 14:30:34 GMT
In order to patch web.xml I see the maven-plugins docs 
http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/1360_1_1.html

then I created patch file (.xweb):

META-INF\cocoon\xpatch\hibernatefilter.xweb

that contains:

<xweb xpath="/web-app"	insert-after="filter[last()]">
	<!-- Hibernate filter -->
	<filter>
		<filter-name>hibernateFilter</filter-name>
		<filter-class>
			org.deals.framework.hb.HibernateFilterSession
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>hibernateFilter</filter-name>
		<url-pattern>*.cflow</url-pattern>
	</filter-mapping>

	<filter-mapping>
		<filter-name>hibernateFilter</filter-name>
		<url-pattern>/deals-3/continue</url-pattern>
	</filter-mapping>
</xweb>


after the cocoon:prepare 

the web.xml is completely broken

for example the hibernate filter become:
<!-- Hibernate filter -->
<filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter</filter-class>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.deals.framework.hb.HibernateFilterSession</param-value>
</init-param>
</filter>


any suggestion?
thanks in advance
Alessandro

below the web.xml after the XPatch

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
or more
  contributor license agreements.  See the NOTICE file
distributed with
  this work for additional information regarding copyright
ownership.
  The ASF licenses this file to You under the Apache
License, Version 2.0
  (the "License"); you may not use this file except in
compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
software
  distributed under the License is distributed on an "AS IS"
BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied.
  See the License for the specific language governing
permissions and
  limitations under the License.
-->
<web-app>

  <context-param>
<param-name>shieled-classloader-use-repository</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingListener</param-name>
<param-value>org.springframework.web.context.ContextLoaderListener
,org.springframework.web.context.request.RequestContextListener</param-value>
</context-param>
<context-param>
    <param-name>contextClass</param-name>
   
<param-value>org.apache.cocoon.tools.rcl.springreloader.SynchronizedConfigureableWebApplicationContext</param-value>
  </context-param>

  <filter>
    <filter-name>ReloadingSpringFilter</filter-name>
    <display-name>ReloadingSpringFilter</display-name>
    <description>Reloads the Spring application context if a
classloader change was detected.</description>
   
<filter-class>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter</filter-class>
  <init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingSpringFilter</param-value>
</init-param>
</filter>
  <filter>
    <filter-name>CocoonMultipartFilter</filter-name>
    <display-name>Cocoon multipart filter</display-name>
    <description>Multipart MIME handling filter for
Cocoon</description>
   
<filter-class>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter</filter-class>
  <init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.servlet.multipart.MultipartFilter</param-value>
</init-param>
</filter>
  <filter>
    <filter-name>CocoonDebugFilter</filter-name>
    <display-name>Cocoon debug filter</display-name>
    <description>Log debug information about each
request</description>
   
<filter-class>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter</filter-class>
  <init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.servlet.DebugFilter</param-value>
</init-param>
</filter>
	<!-- Hibernate filter -->
	<filter>
		<filter-name>hibernateFilter</filter-name>
		<filter-class>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter</filter-class>
	<init-param>
<param-name>filter-class</param-name>
<param-value>org.deals.framework.hb.HibernateFilterSession</param-value>
</init-param>
</filter>

	<filter-mapping>
		<filter-name>hibernateFilter</filter-name>
		<url-pattern>*.cflow</url-pattern>
	</filter-mapping>

	<filter-mapping>
		<filter-name>hibernateFilter</filter-name>
		<url-pattern>/deals-3/continue</url-pattern>
	</filter-mapping>


  <filter-mapping>
    <filter-name>ReloadingSpringFilter</filter-name>
    <servlet-name>DispatcherServlet</servlet-name>
  </filter-mapping>
  <filter-mapping>
    <filter-name>CocoonDebugFilter</filter-name>
    <servlet-name>DispatcherServlet</servlet-name>
  </filter-mapping>
  <filter-mapping>
    <filter-name>CocoonMultipartFilter</filter-name>
    <servlet-name>DispatcherServlet</servlet-name>
  </filter-mapping>

  <listener>
   
<listener-class>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingListener</listener-class>
  </listener>
  

  <servlet>
    <servlet-name>DispatcherServlet</servlet-name>
    <display-name>DispatcherServlet</display-name>
    <description>Cocoon blocks dispatcher</description>
   
<servlet-class>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServlet</servlet-class>
    <init-param>
<param-name>servlet-class</param-name>
<param-value>org.apache.cocoon.servletservice.DispatcherServlet</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>DispatcherServlet</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>DispatcherServlet</servlet-name>
    <url-pattern>*.jsp</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>DispatcherServlet</servlet-name>
    <url-pattern>*.html</url-pattern>
  </servlet-mapping>

  <!-- various MIME type mappings
====================================== -->
  <mime-mapping>
    <extension>css</extension>
    <mime-type>text/css</mime-type>
  </mime-mapping>
  <mime-mapping>
    <extension>xml</extension>
    <mime-type>text/xml</mime-type>
  </mime-mapping>
  <mime-mapping>
    <extension>xsl</extension>
    <mime-type>text/xml</mime-type>
  </mime-mapping>
  <mime-mapping>
    <extension>xconf</extension>
    <mime-type>text/xml</mime-type>
  </mime-mapping>
  <mime-mapping>
    <extension>xmap</extension>
    <mime-type>text/xml</mime-type>
  </mime-mapping>
  <mime-mapping>
    <extension>ent</extension>
    <mime-type>text/plain</mime-type>
  </mime-mapping>
  <mime-mapping>
    <extension>grm</extension>
    <mime-type>text/plain</mime-type>
  </mime-mapping>

</web-app>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message