You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by di...@apache.org on 2001/03/23 13:08:20 UTC
cvs commit: xml-cocoon/src/org/apache/cocoon/components/url ContextURLFactory.java
dims 01/03/23 04:08:19
Modified: src/org/apache/cocoon/components/url Tag: xml-cocoon2
ContextURLFactory.java
Log:
Replace Hard-coded string with Constants.CONTEXT_SERVLET_CONTEXT
Revision Changes Path
No revision
No revision
1.1.2.3 +4 -2 xml-cocoon/src/org/apache/cocoon/components/url/Attic/ContextURLFactory.java
Index: ContextURLFactory.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/url/Attic/ContextURLFactory.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- ContextURLFactory.java 2001/02/12 13:50:23 1.1.2.2
+++ ContextURLFactory.java 2001/03/23 12:08:15 1.1.2.3
@@ -12,13 +12,15 @@
import javax.servlet.ServletContext;
+import org.apache.cocoon.Constants;
+
import org.apache.avalon.Context;
import org.apache.avalon.Contextualizable;
import org.apache.avalon.AbstractLoggable;
/**
* @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
- * @version $Id: ContextURLFactory.java,v 1.1.2.2 2001/02/12 13:50:23 bloritsch Exp $
+ * @version $Id: ContextURLFactory.java,v 1.1.2.3 2001/03/23 12:08:15 dims Exp $
*/
public class ContextURLFactory extends AbstractLoggable implements URLFactory, Contextualizable {
@@ -37,7 +39,7 @@
* @exception MalformedURLException If the location is malformed
*/
public URL getURL(String location) throws MalformedURLException {
- ServletContext servletContext = (ServletContext)context.get("servlet-context");
+ ServletContext servletContext = (ServletContext)context.get(CONTEXT_SERVLET_CONTEXT);
if (servletContext == null) {
getLogger().warn("no servlet-context in application context (making an absolute URL)");
return new URL(location);
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org