On 02/09/2011 04:00 PM, Myles Byrne wrote:
Thanks, Andre! It would be a godsend to route around this problem.
But I haven't been able to get param passing to work as you suggest.
Following from your example, this sitemap match:
<map:pipeline>
<map:match pattern="something">
<map:match type="request-parameter" pattern="url" />
<map:generate src="{1}"/>
....
.. would require this matcher setup in components, no?
<map:matcher name="request-parameter"
src="org.apache.cocoon.matching.RequestParameterMatcher"/>
I actually had nothing like that in the sitemap. It just worked. But I
should note that I was using this with a version older than cocoon 2.2.
You are using cocoon 2.2, right?
Your url value is pointing to a remote server, other than the one you
are running cocoon? I guess, the code above did get the value of url,
but its value is misinterpreted by cocoon, as it tries to find
something of the local disk instead. The <map:generate src="{1}" />
could be causing this. If url's value does actually refer to a local
resource, it is looking in the wrong place, as the url's value may be
interpreted as being relative to the root of your block, while you may
had a different location in mind.
I haven't been able to get this to work .. the trace says:
javax.servlet.ServletException:
org.apache.cocoon.ResourceNotFoundException: Resource not found.
...
Caused by: org.apache.excalibur.source.SourceNotFoundException:
file:///home/... /./src/main/resources/COB-INF/ doesn't exist.
.. This seems better than the outright fail of the default URI matcher,
but i'm having a hard time fixing this, too. Any pointer to get the
param passing as you suggest?
Cheers,
- Myles
FIMM.fi
On Tue, Feb 8, 2011 at 8:35 PM, Andre Juffer <ajuf...@sun3.oulu.fi
<mailto:ajuf...@sun3.oulu.fi>> wrote:
On 02/08/2011 04:32 PM, Myles Byrne wrote:
Hi all,
Coming right off the current basic archetype with samples,
simply adding
a basic URL matcher:
<map:match pattern="url=**">
<map:generate src="{1}"/>
You could rewrite this as
<map:pipeline>
<map:match pattern="something">
<map:match type="request-parameter" pattern="url" />
<map:generate src="{1}"/>
....
This should work fine with a request like:
www.foo.com/something?url=value <http://www.foo.com/something?url=value>
etc ..
.. works fine in Jetty, but in Tomcat throws:
"Javax.servlet.ServletException:
org.apache.cocoon.ProcessingException:
Sitemap: error invoking matcher" (the rest of the trace is below)
.. where the error specifies the end of the match line above.
I thought this looked like a UTF8 issue, so have followed the
directions
for this in both Cocoon and Tomcat. Since this hasn't fixed the
problem
yet, i have to ask the experts: UTF-8 issue? Anything else that can
differ so fundamentally between Jetty and Tomcat?
Cheers,
- Myles Byrne
fimm.fi <http://fimm.fi> <http://fimm.fi>
-------------------
avax.servlet.ServletException:
org.apache.cocoon.ProcessingException: Sitemap: error invoking
matcher
at<map:match> -
file:///opt/apps/apache-tomcat-6.0.18/work/Catalina/localhost/lsdbweb-1.0.0/blocks/lsdb/sitemap.xmap:56:32
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:230)
org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:84)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:468)
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:443)
org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:264)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy3.service(Unknown Source)
org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:106)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:131)
*root cause*
org.apache.cocoon.ProcessingException: Sitemap: error invoking
matcher
at<map:match> -
file:///opt/apps/apache-tomcat-6.0.18/work/Catalina/localhost/lsdbweb-1.0.0/blocks/lsdb/sitemap.xmap:56:32
org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:111)
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:90)
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:81)
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:239)
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:171)
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:247)
org.apache.cocoon.servlet.RequestProcessor.process(RequestProcessor.java:351)
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:169)
org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:84)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:468)
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:443)
org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:264)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy3.service(Unknown Source)
org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:106)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:131)
*root cause*
java.lang.NullPointerException
sun.net.www.ParseUtil.toURI(ParseUtil.java:261)
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:723)
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)
sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2052)
java.net.HttpURLConnection.getHeaderFieldDate(HttpURLConnection.java:444)
java.net.URLConnection.getLastModified(URLConnection.java:532)
sun.net.www.protocol.https.HttpsURLConnectionImpl.getLastModified(HttpsURLConnectionImpl.java:398)
org.apache.excalibur.source.impl.URLSource.getInfos(URLSource.java:190)
org.apache.excalibur.source.impl.AbstractSource.checkInfos(AbstractSource.java:62)
org.apache.excalibur.source.impl.AbstractSource.getLastModified(AbstractSource.java:144)
org.apache.excalibur.source.impl.URLSource.getValidity(URLSource.java:323)
org.apache.cocoon.generation.FileGenerator.getValidity(FileGenerator.java:127)
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.getValidityForInternalPipeline(AbstractCachingProcessingPipeline.java:982)
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupValidities(AbstractCachingProcessingPipeline.java:482)
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:720)
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:466)
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:411)
sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:71)
$Proxy26.process(Unknown Source)
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:147)
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87)
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:81)
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:239)
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:171)
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:247)
org.apache.cocoon.servlet.RequestProcessor.process(RequestProcessor.java:351)
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:169)
org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:84)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:468)
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:443)
org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:264)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy3.service(Unknown Source)
org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:106)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:131)
--
Andre H. Juffer | Phone: <tel:+35885531161>+358-8-553
1161 <tel:+35885531161>
Biocenter Oulu and | Fax:
<tel:+35885531141>+358-8-553-1141 <tel:+35885531141>
Department of Biochemistry | Email: andre.juf...@oulu.fi
<mailto:andre.juf...@oulu.fi>
University of Oulu, Finland | WWW:
www.biochem.oulu.fi/Biocomputing/
<http://www.biochem.oulu.fi/Biocomputing/>
StruBioCat | WWW: www.strubiocat.oulu.fi
<http://www.strubiocat.oulu.fi>
NordProt | WWW: www.nordprot.org
<http://www.nordprot.org>
Triacle Biocomputing | WWW: www.triacle-bc.com
<http://www.triacle-bc.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
<mailto:users-unsubscr...@cocoon.apache.org>
For additional commands, e-mail: users-h...@cocoon.apache.org
<mailto:users-h...@cocoon.apache.org>
--
Andre H. Juffer | Phone: +358-8-553 1161
Biocenter Oulu and | Fax: +358-8-553-1141
Department of Biochemistry | Email: andre.juf...@oulu.fi
University of Oulu, Finland | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat | WWW: www.strubiocat.oulu.fi
NordProt | WWW: www.nordprot.org
Triacle Biocomputing | WWW: www.triacle-bc.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org