cziegeler 2003/03/14 00:39:16
Modified: src/java/org/apache/cocoon/components/resolver
DefaultResolver.java
src/webapp/WEB-INF cocoon.xconf
src/documentation cocoon.xconf
Log:
Changing resolving of default catalog
Revision Changes Path
1.4 +4 -9
cocoon-2.1/src/java/org/apache/cocoon/components/resolver/DefaultResolver.java
Index: DefaultResolver.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/resolver/DefaultResolver.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DefaultResolver.java 13 Mar 2003 15:13:14 -0000 1.3
+++ DefaultResolver.java 14 Mar 2003 08:39:16 -0000 1.4
@@ -76,13 +76,8 @@
*/
protected void parseCatalog(String file) {
// relative uri
- if (file.indexOf(":/") == -1) {
- StringBuffer bu = new StringBuffer("context:/");
- if (!file.startsWith("/")) {
- bu.append('/');
- }
- bu.append( file );
- file = bu.toString();
+ if (file.indexOf(":/") == -1 && !file.startsWith("/") ) {
+ file = "context://" + file;
}
super.parseCatalog( file );
}
@@ -91,6 +86,6 @@
* Default catalog path
*/
protected String defaultCatalog() {
- return "/WEB-INF/entities/catalog";
+ return "WEB-INF/entities/catalog";
}
}
1.7 +3 -3 cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf
Index: cocoon.xconf
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- cocoon.xconf 12 Mar 2003 19:07:55 -0000 1.6
+++ cocoon.xconf 14 Mar 2003 08:39:16 -0000 1.7
@@ -206,11 +206,11 @@
<!--+
| Entity resolution catalogs
|
- | The default catalog is distributed at /WEB-INF/entities/catalog
+ | The default catalog is distributed at WEB-INF/entities/catalog
| This is the contextual pathname for Cocoon resources.
| You can override this path, if necessary, using the "catalog" parameter:
|
- | <parameter name="catalog" value="/WEB-INF/entities/catalog"/>
+ | <parameter name="catalog" value="WEB-INF/entities/catalog"/>
|
| However, it is probably desirable to leave this default catalog config
| and declare your own local catalogs, which are loaded in addition to
@@ -238,7 +238,7 @@
| <parameter name="verbosity" value="2"/>
+-->
<entity-resolver logger="core.resolver">
- <parameter name="catalog" value="/WEB-INF/entities/catalog"/>
+ <parameter name="catalog" value="WEB-INF/entities/catalog"/>
<parameter name="verbosity" value="1"/>
</entity-resolver>
1.3 +1 -1 cocoon-2.1/src/documentation/cocoon.xconf
Index: cocoon.xconf
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/documentation/cocoon.xconf,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cocoon.xconf 12 Mar 2003 09:35:38 -0000 1.2
+++ cocoon.xconf 14 Mar 2003 08:39:16 -0000 1.3
@@ -92,7 +92,7 @@
<!-- Entity resolution catalogs -->
<entity-resolver logger="core.resolver">
- <parameter name="catalog" value="/WEB-INF/entities/catalog"/>
+ <parameter name="catalog" value="WEB-INF/entities/catalog"/>
<parameter name="verbosity" value="1"/>
</entity-resolver>