dims 01/08/30 08:17:03
Modified: src/org/apache/cocoon/environment AbstractEnvironment.java
src/org/apache/cocoon/environment/wrapper
EnvironmentWrapper.java
webapp sitemap.xmap
Log:
- Still fishing for a fix for problem why
"http://localhost:8080/cocoon/sub/welcome.source" fails!!!
- Added more debug statements trying to trace the source of the problem.
Revision Changes Path
1.18 +34 -4
xml-cocoon2/src/org/apache/cocoon/environment/AbstractEnvironment.java
Index: AbstractEnvironment.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/org/apache/cocoon/environment/AbstractEnvironment.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- AbstractEnvironment.java 2001/08/20 21:47:30 1.17
+++ AbstractEnvironment.java 2001/08/30 15:17:03 1.18
@@ -24,7 +24,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.17 $ $Date: 2001/08/20 21:47:30 $
+ * @version CVS $Revision: 1.18 $ $Date: 2001/08/30 15:17:03 $
*/
public abstract class AbstractEnvironment extends AbstractLoggable implements
Environment {
@@ -100,8 +100,7 @@
/**
* Get the <code>SourceHandler</code> for the current request
*/
- public SourceHandler getSourceHandler()
- {
+ public SourceHandler getSourceHandler() {
return this.sourceHandler;
}
@@ -122,17 +121,40 @@
}
/**
+ * Set the uri in progress. The prefix is stripped off
+ */
+ public void setURI(String uris) {
+ getLogger().debug("Set the URIs (OLD=" + this.uris + ", NEW=" + uris + ")");
+ this.uris = uris;
+ }
+
+ /**
* Get the Root Context
*/
public URL getRootContext() {
return this.rootContext;
}
+ /**
+ * Set the Root Context
+ */
+ public void setRootContext(URL rootContext) {
+ getLogger().debug("Set the root context (OLD=" + this.rootContext + ",
NEW=" + rootContext + ")");
+ this.rootContext = rootContext;
+ }
+
+ /**
+ * Get the current Context
+ */
public URL getContext() {
return this.context;
}
+ /**
+ * Set the current Context
+ */
public void setContext(URL context) {
+ getLogger().debug("Forcing a context (OLD=" + this.context + ", NEW=" +
context + ")");
this.context = context;
}
@@ -144,6 +166,14 @@
}
/**
+ * Set the prefix of the URI in progress
+ */
+ public void setURIPrefix(String prefix) {
+ getLogger().debug("Set the URI Prefix (OLD=" + this.prefix.toString() + ",
NEW=" + prefix + ")");
+ this.prefix = new StringBuffer(prefix);
+ }
+
+ /**
* Adds an prefix to the overall stripped off prefix from the request uri
*/
public void changeContext(String prefix, String context)
@@ -241,7 +271,7 @@
*/
public Source resolve(String systemId)
throws ProcessingException, SAXException, IOException {
- this.getLogger().debug("Resolving '"+systemId+"'");
+ this.getLogger().debug("Resolving '"+systemId+"' in context '" +
this.context + "'");
if (systemId == null) throw new SAXException("Invalid System ID");
Source source;
1.8 +5 -5
xml-cocoon2/src/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java
Index: EnvironmentWrapper.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- EnvironmentWrapper.java 2001/08/20 13:55:14 1.7
+++ EnvironmentWrapper.java 2001/08/30 15:17:03 1.8
@@ -29,7 +29,7 @@
* contains a <code>RequestWrapper</code> object.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version $Id: EnvironmentWrapper.java,v 1.7 2001/08/20 13:55:14 dims Exp $
+ * @version $Id: EnvironmentWrapper.java,v 1.8 2001/08/30 15:17:03 dims Exp $
*/
public final class EnvironmentWrapper
extends AbstractEnvironment
@@ -153,12 +153,12 @@
* If the prefix is not null the context is changed to the root
* context and the prefix is set.
*/
- public void setURI(String prefix, String uri) {
+ public void setURI(String prefix, String uris) {
if (prefix != null) {
- this.context = this.rootContext;
- this.prefix = new StringBuffer(prefix);
+ setContext(getRootContext());
+ setURIPrefix(prefix);
}
- this.uris = uri;
+ setURI(uris);
}
}
1.46 +1 -1 xml-cocoon2/webapp/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/xml-cocoon2/webapp/sitemap.xmap,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- sitemap.xmap 2001/08/28 12:52:23 1.45
+++ sitemap.xmap 2001/08/30 15:17:03 1.46
@@ -198,7 +198,7 @@
<!-- Utility for viewing source xml or html-->
<map:pipeline>
<map:match pattern="**.source">
- <map:generate src="cocoon://{1}" />
+ <map:generate src="cocoon:/{1}" />
<map:transform src="stylesheets/simple-xml2html.xsl"/>
<map:serialize/>
</map:match>
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]