cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Re: Cocoon 2.2.1 - Context path at root doesn't work
Date Sat, 26 Jul 2008 15:09:35 GMT
Hugh Sparks pisze:
> I've been developing a blockless webapp that has the
> sitemap context path set to root:
> 
> <bean id="mydomain.com.mything.service"
>    class="org.apache.cocoon.sitemap.SitemapServlet">
>    <servlet:context mount-path="" context-path="/">
> </bean>
> 
> When I updated from cocoon-core-2.2.0 to 2.2.1, I got this
> error after starting jetty:
> 
> java.lang.RuntimeException: Failed to obtain blockContexts Map.
> The most probable cause is that BlockDeploymentServletContextListener
> has not been executed. Check your web.xml or upgrade your Cocoon
> Maven plug-in.
> 
> I updated my cocoon-maven-plugin to the most recent 1.0.0-RC1-SNAPSHOT.
> Then I added this listener to web.xml:
> 
> <listener>
>    <description>Declare a context listener that installs all 
> blocks.</description>
>    <listener-class>
>        
> org.apache.cocoon.blockdeployment.BlockDeploymentServletContextListener
>    </listener-class>
> </listener>
> 
> I didn't think I needed it because my webapp doesn't host any blocks.

I'm not sure what's the cause but my guess that block support is enabled by default and I
guess 
there is no easy way to disable it even if you don't need it.

> Jetty starts "quietly" now, but when the browser visits the page:
> 
>    http://localhost:8888/
> 
> I get this error:
> 
>    Could not create configuration for TreeProcesoor;
>    nested exception is java.net.MalformedURLException: no protocol: /
> 
> The SitemapServelt doesn't seem to like the context-path set to "/"
> Is there some protocol I should use "xxx:/" to start the webapp with
> the context at root?

Hugh, just to make sure that we understand context-path parameter the same way:
context-path tells SitemapServlet what's the base path against which all relative paths used
in 
sitemap are resolved.

If you are really sure that it must be "/" (which is quite surprising to me) you probably
need to 
use file: protocol, so just put file:/// into context-path.

-- 
Grzegorz Kossakowski

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message