web:cache-control-filter not recognized in components.xml
ericroth Jun 9, 2011 4:07 PMWe are doing some tuning of a Seam 2.2.1 Final enterprise application (.ear file) and received the following error when trying to add the "web:cache-control-filter" entries to components.xml for caching .js, .css, and images:
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'web:cache-control-filter'.
I checked the xsd file used for the web namespace ( http://jboss.com/products/seam/web-2.2.xsd ) and couldn't find any reference to cache-control-filter.
Does anyone know if this is the correct xsd file or not? Here is our version of components.xml:
==========
<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.com/products/seam/components"
xmlns:core="http://jboss.com/products/seam/core"
xmlns:persistence="http://jboss.com/products/seam/persistence"
xmlns:drools="http://jboss.com/products/seam/drools"
xmlns:bpm="http://jboss.com/products/seam/bpm"
xmlns:security="http://jboss.com/products/seam/security"
xmlns:mail="http://jboss.com/products/seam/mail"
xmlns:web="http://jboss.com/products/seam/web"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:theme="http://jboss.com/products/seam/theme"
xmlns:international="http://jboss.com/products/seam/international"
xsi:schemaLocation=
"http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd
http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd
http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd
http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.2.xsd
http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd
http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd
http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd
http://jboss.com/products/seam/theme http://jboss.com/products/seam/theme-2.2.xsd
http://jboss.com/products/seam/international http://jboss.com/products/seam/international-2.2.xsd">
<core:init debug="false" jndi-pattern="@jndiPattern@"/>
<web:cache-control-filter name="imageCacheControlFilter"
regex-url-pattern=".*(\.gif|\.png|\.jpg|\.jpeg)"
value="max-age=86400"/>
<web:cache-control-filter name="textCacheControlFilter"
regex-url-pattern=".*(\.css|\.js)"
value="max-age=86400"/>
<!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
<web:hot-deploy-filter url-pattern="*.seam"/>
<persistence:managed-persistence-context name="entityManager" auto-create="true"
persistence-unit-jndi-name="java:/ccxEntityManagerFactory"/>
<drools:rule-base name="securityRules">
<drools:rule-files>
<value>/security.drl</value>
</drools:rule-files>
</drools:rule-base>
<security:rule-based-permission-resolver security-rules="#{securityRules}"/>
<security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true"/>
<event type="org.jboss.seam.security.notLoggedIn">
<action execute="#{redirect.captureCurrentView}"/>
</event>
<event type="org.jboss.seam.security.loginSuccessful">
<action execute="#{redirect.returnToCapturedView}"/>
</event>
<mail:mail-session host="localhost" port="25"/>
<!-- Begin addition for CCX application -->
<!-- To add another theme, add another <value> entry here -->
<!-- and add another properties file to the \src project folder -->
<theme:theme-selector cookie-enabled="false">
<theme:available-themes>
<value>cs</value>
</theme:available-themes>
</theme:theme-selector>
<international:locale-selector cookie-enabled="true"/>
<!-- End addition for CCX application -->
<!-- For use with jBPM pageflow or process management -->
<!--
<bpm:jbpm>
<bpm:process-definitions></bpm:process-definitions>
<bpm:pageflow-definitions></bpm:pageflow-definitions>
</bpm:jbpm>
-->
</components>
==========
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'web:cache-control-filter'.
I checked the xsd file used for the web namespace ( http://jboss.com/products/seam/web-2.2.xsd ) and couldn't find any reference to cache-control-filter.
Does anyone know if this is the correct xsd file or not? Here is our version of components.xml:
==========
<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.com/products/seam/components"
xmlns:core="http://jboss.com/products/seam/core"
xmlns:persistence="http://jboss.com/products/seam/persistence"
xmlns:drools="http://jboss.com/products/seam/drools"
xmlns:bpm="http://jboss.com/products/seam/bpm"
xmlns:security="http://jboss.com/products/seam/security"
xmlns:mail="http://jboss.com/products/seam/mail"
xmlns:web="http://jboss.com/products/seam/web"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:theme="http://jboss.com/products/seam/theme"
xmlns:international="http://jboss.com/products/seam/international"
xsi:schemaLocation=
"http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd
http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd
http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd
http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.2.xsd
http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd
http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd
http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd
http://jboss.com/products/seam/theme http://jboss.com/products/seam/theme-2.2.xsd
http://jboss.com/products/seam/international http://jboss.com/products/seam/international-2.2.xsd">
<core:init debug="false" jndi-pattern="@jndiPattern@"/>
<web:cache-control-filter name="imageCacheControlFilter"
regex-url-pattern=".*(\.gif|\.png|\.jpg|\.jpeg)"
value="max-age=86400"/>
<web:cache-control-filter name="textCacheControlFilter"
regex-url-pattern=".*(\.css|\.js)"
value="max-age=86400"/>
<!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
<web:hot-deploy-filter url-pattern="*.seam"/>
<persistence:managed-persistence-context name="entityManager" auto-create="true"
persistence-unit-jndi-name="java:/ccxEntityManagerFactory"/>
<drools:rule-base name="securityRules">
<drools:rule-files>
<value>/security.drl</value>
</drools:rule-files>
</drools:rule-base>
<security:rule-based-permission-resolver security-rules="#{securityRules}"/>
<security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true"/>
<event type="org.jboss.seam.security.notLoggedIn">
<action execute="#{redirect.captureCurrentView}"/>
</event>
<event type="org.jboss.seam.security.loginSuccessful">
<action execute="#{redirect.returnToCapturedView}"/>
</event>
<mail:mail-session host="localhost" port="25"/>
<!-- Begin addition for CCX application -->
<!-- To add another theme, add another <value> entry here -->
<!-- and add another properties file to the \src project folder -->
<theme:theme-selector cookie-enabled="false">
<theme:available-themes>
<value>cs</value>
</theme:available-themes>
</theme:theme-selector>
<international:locale-selector cookie-enabled="true"/>
<!-- End addition for CCX application -->
<!-- For use with jBPM pageflow or process management -->
<!--
<bpm:jbpm>
<bpm:process-definitions></bpm:process-definitions>
<bpm:pageflow-definitions></bpm:pageflow-definitions>
</bpm:jbpm>
-->
</components>
==========