You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2006/10/12 18:03:52 UTC
svn commit: r463297 - in /cocoon/trunk:
blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/transformation/
core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/
core/cocoon-core/src/main/java/org...
Author: cziegeler
Date: Thu Oct 12 09:03:45 2006
New Revision: 463297
URL: http://svn.apache.org/viewvc?view=rev&rev=463297
Log:
Use servlet aware path matcher
Modified:
cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/transformation/HTMLEventLinkTransformer.java
cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/FlowNodeBuilder.java
cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/AbstractElementParser.java
cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ResourceUtils.java
cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonBeanPostProcessor.java
cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ConfigurationReader.java
cocoon/trunk/core/cocoon-webapp/pom.xml
Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/transformation/HTMLEventLinkTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/transformation/HTMLEventLinkTransformer.java?view=diff&rev=463297&r1=463296&r2=463297
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/transformation/HTMLEventLinkTransformer.java (original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/transformation/HTMLEventLinkTransformer.java Thu Oct 12 09:03:45 2006
@@ -127,13 +127,11 @@
protected void createAnchorEvent(Attributes attributes)
throws SAXException {
- AttributesImpl newAttributes = new AttributesImpl(attributes);
+ final CopletInstance cid = this.getCopletInstanceData();
+ final AttributesImpl newAttributes = new AttributesImpl(attributes);
newAttributes.removeAttribute("href");
newAttributes.removeAttribute("external");
- String link = attributes.getValue("href");
-
- CopletInstance cid = this.getCopletInstanceData();
- link = this.getLink((String)cid.getTemporaryAttribute(this.attributeName), link);
+ final String link = this.getLink((String)cid.getTemporaryAttribute(this.attributeName), attributes.getValue("href"));
newAttributes.addCDATAAttribute("path", this.jxPath);
newAttributes.addCDATAAttribute("value", link);
@@ -148,12 +146,10 @@
protected void createFormEvent(Attributes attributes)
throws SAXException {
- AttributesImpl newAttributes = new AttributesImpl(attributes);
+ final CopletInstance cid = this.getCopletInstanceData();
+ final AttributesImpl newAttributes = new AttributesImpl(attributes);
newAttributes.removeAttribute("action");
- String link = attributes.getValue("action");
-
- CopletInstance cid = this.getCopletInstanceData();
- link = this.getLink((String)cid.getTemporaryAttribute(this.attributeName), link);
+ final String link = this.getLink((String)cid.getTemporaryAttribute(this.attributeName), attributes.getValue("action"));
newAttributes.addCDATAAttribute("path", this.jxPath);
newAttributes.addCDATAAttribute("value", link);
Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/FlowNodeBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/FlowNodeBuilder.java?view=diff&rev=463297&r1=463296&r2=463297
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/FlowNodeBuilder.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/FlowNodeBuilder.java Thu Oct 12 09:03:45 2006
@@ -25,7 +25,7 @@
import org.springframework.context.ApplicationContext;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.web.context.support.ServletContextResourcePatternResolver;
/**
* Builder of a {@link FlowNode} instance, corresponding to a
@@ -59,7 +59,7 @@
final ResourceLoader resourceLoader = (ApplicationContext)beanFactory;
final String scriptLocation = config.getAttribute("location", DEFAULT_FLOW_SCRIPT_LOCATION);
if ( resourceLoader.getResource(scriptLocation).exists() ) {
- final PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(resourceLoader);
+ final ServletContextResourcePatternResolver resolver = new ServletContextResourcePatternResolver(resourceLoader);
final Resource[] resources = resolver.getResources(scriptLocation + "/*");
if ( resources != null ) {
for(int i=0; i < resources.length; i++) {
Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/AbstractElementParser.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/AbstractElementParser.java?view=diff&rev=463297&r1=463296&r2=463297
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/AbstractElementParser.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/AbstractElementParser.java Thu Oct 12 09:03:45 2006
@@ -34,7 +34,7 @@
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.web.context.support.ServletContextResourcePatternResolver;
import org.w3c.dom.Element;
/**
@@ -194,7 +194,7 @@
boolean optional)
throws Exception {
final ResourceLoader resourceLoader = parserContext.getReaderContext().getReader().getResourceLoader();
- PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(resourceLoader);
+ ServletContextResourcePatternResolver resolver = new ServletContextResourcePatternResolver(resourceLoader);
final String includeURI = src;
String directoryURI = null;
if (includeURI == null) {
Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ResourceUtils.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ResourceUtils.java?view=diff&rev=463297&r1=463296&r2=463297
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ResourceUtils.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ResourceUtils.java Thu Oct 12 09:03:45 2006
@@ -29,8 +29,8 @@
import org.apache.commons.logging.Log;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
+import org.springframework.web.context.support.ServletContextResourcePatternResolver;
/**
* Utility class for Spring resource handling
@@ -81,7 +81,7 @@
if ( directoryResource.exists() ) {
final String pattern = directoryName + "/*.properties";
- final ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(resourceLoader);
+ final ResourcePatternResolver resolver = new ServletContextResourcePatternResolver(resourceLoader);
Resource[] resources = null;
try {
resources = resolver.getResources(pattern);
Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonBeanPostProcessor.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonBeanPostProcessor.java?view=diff&rev=463297&r1=463296&r2=463297
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonBeanPostProcessor.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonBeanPostProcessor.java Thu Oct 12 09:03:45 2006
@@ -45,7 +45,7 @@
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.web.context.support.ServletContextResourcePatternResolver;
/**
* This is a Spring BeanPostProcessor adding support for the Avalon lifecycle interfaces.
@@ -107,7 +107,7 @@
this.logger.debug("Trying to read properties from directory: " + this.location);
}
final Properties mergedProps = new Properties();
- final PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(resourceLoader);
+ final ServletContextResourcePatternResolver resolver = new ServletContextResourcePatternResolver(resourceLoader);
final Resource dirResource = resourceLoader.getResource(this.location);
if ( dirResource.exists() ) {
Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ConfigurationReader.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ConfigurationReader.java?view=diff&rev=463297&r1=463296&r2=463297
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ConfigurationReader.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ConfigurationReader.java Thu Oct 12 09:03:45 2006
@@ -36,9 +36,10 @@
import org.apache.cocoon.core.container.spring.ResourceUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.web.context.support.ServletContextResourcePatternResolver;
import org.xml.sax.InputSource;
/**
@@ -54,7 +55,7 @@
protected final Log logger = LogFactory.getLog(getClass());
/** Resolver for reading configuration files. */
- protected final PathMatchingResourcePatternResolver resolver;
+ protected final ServletContextResourcePatternResolver resolver;
/** The configuration info. */
protected final ConfigurationInfo configInfo;
@@ -115,9 +116,9 @@
throws Exception {
this.isRootContext = parentInfo == null;
if ( resourceLoader != null ) {
- this.resolver = new PathMatchingResourcePatternResolver(resourceLoader);
+ this.resolver = new ServletContextResourcePatternResolver(resourceLoader);
} else {
- this.resolver = new PathMatchingResourcePatternResolver();
+ this.resolver = new ServletContextResourcePatternResolver(new DefaultResourceLoader());
}
// now add selectors from parent
Modified: cocoon/trunk/core/cocoon-webapp/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-webapp/pom.xml?view=diff&rev=463297&r1=463296&r2=463297
==============================================================================
--- cocoon/trunk/core/cocoon-webapp/pom.xml (original)
+++ cocoon/trunk/core/cocoon-webapp/pom.xml Thu Oct 12 09:03:45 2006
@@ -58,7 +58,7 @@
<configuration>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
- <port>8888</port>
+ <port>9888</port>
<maxIdleTime>30000</maxIdleTime>
</connector>
</connectors>