cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: ${cocoon.request.contextPath} returns null in 2.2
Date Mon, 29 Jan 2007 20:14:49 GMT
Daniel Fagerstrom napisaƂ(a):
> You don't get that part, which show that there is a problem with my 
> design. I probably mounted the dispatcher servlet at "/*" while 
> developing the stuff :/ Thinking a little bit more about it, it would 
> probably better to let the servlet path of the dispatcher servlet go 
> to the context path when calling the servlet services. Then we would get:
> newContextPath = contextPath + servletPath
> newServletPath = mountPath
> newPathInfo = pathInfo.substring(mountPath.length())
> where servletPath above is the servletPath of the dispatcher servlet 
> in the web.xml. Looking at it this mapping looks much more natural 
> than the original one. But there might have been some god reason that 
> I choose the original design that I have forgotten. If no one finds 
> any problem with the new proposal we could switch to that.
Maybe I'm myopic but I would go for that. Speaking for myself I was 
having hard times understanding this path calculations, your new 
proposal seems to be more natural for me also.
> To get the mountPath, it is better to use the blockPath module e.g. 
> {block-path:ajax} (assuming that the cocoon-ajax-impl service servlet 
> is connected at the name ajax in the Spring config). You can also use 
> the service protocol inside the pipeline:
> <script type="text/javascript"
> src="servlet:ajax://resources/dojo/dojo.js"/>
> and end the pipeline with a link rewriter transformer that use the 
> block path module to get the path right.
> The link rewriter transformer can probably be configured to add the 
> prefix "/blocks-test" as well 

Doh! I've learned about blocks connections just few days ago and had 
enough time to forgot them ;)
Obviously, I will try your hints.

Grzegorz Kossakowski

View raw message