cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: Internal Pipelines (was: [RT] reconsidering pipeline semantics)
Date Thu, 04 Jul 2002 13:20:37 GMT
On 04.Jul.2002 -- 11:50 AM, Sylvain Wallez wrote:
> The redirector used (ForwardRedirector) handles the special "cocoon:" 
> protocol as internal redirects (aka "forward") which should consider the 
> request as internal.
> 
> However, I noticed Carsten has added a processInternal() method to 
> Processor and I wonder if there is some side-effects that break internal 
> pipelines. Can you check if internal pilepelines still work as expected 
> (using a simple cocoon: source) ? I unfortunately have no time to do it 
> myself.

If I did everything correctly, yes. (Samples are still in disorder, so
I couldn't test with existing sample) In mount/vquadrat/sitemap.xmap:

  <map:pipelines>

	<map:pipeline internal-only="true">
	  <map:match pattern="internal/*">
        <map:call resource="dynamic-page">
		  <map:parameter name="target" value="login"/>
        </map:call>
	  </map:match>
	</map:pipeline>


	<map:pipeline>
	  <map:match pattern="test">
	    <map:read src="cocoon://mount/vquadrat/internal/login"/>
	  </map:match>
	</map:pipeline>

DEBUG   (2002-07-04) 15:16.59:824   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/DefaultComponentFactory:
ComponentFactory creating new instance of org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline.
DEBUG   (2002-07-04) 15:16.59:825   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/DefaultComponentFactory:
no logger attribute available, using standard logger
DEBUG   (2002-07-04) 15:16.59:825   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/ResourceLimitingPool:
Created a new org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline from the
object factory.
DEBUG   (2002-07-04) 15:16.59:826   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/ResourceLimitingPool:
Got a org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline from the pool.
DEBUG   (2002-07-04) 15:16.59:826   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/ExcaliburComponentSelector:
readers: ComponentSelector could not find the component for hint: resource
DEBUG   (2002-07-04) 15:16.59:827   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/DefaultComponentFactory:
ComponentFactory creating new instance of org.apache.cocoon.reading.ResourceReader.
DEBUG   (2002-07-04) 15:16.59:827   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/DefaultComponentFactory:
logger attribute is sitemap.reader.resource
DEBUG   (2002-07-04) 15:16.59:828   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/ResourceLimitingPool:
Created a new org.apache.cocoon.reading.ResourceReader from the object factory.
DEBUG   (2002-07-04) 15:16.59:828   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/ResourceLimitingPool:
Got a org.apache.cocoon.reading.ResourceReader from the pool.
INFO    (2002-07-04) 15:16.59:831   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/PreparableMatchNode:
Matcher 'wildcard' matched prepared pattern 'mount/*/**' at jndi:/localhost/cocoon/sitemap.xmap:461:37
DEBUG   (2002-07-04) 15:16.59:832   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/InvokeContext:
Current Sitemap Parameters:
PARAM: '2' VALUE: 'internal/login'
PARAM: '1' VALUE: 'vquadrat'
PARAM: '0' VALUE: 'mount/vquadrat/internal/login'

INFO    (2002-07-04) 15:16.59:836   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/PreparableMatchNode:
Matcher 'wildcard' matched prepared pattern 'internal/*' at file:/projects/haul/jakarta-tomcat-4.0.4-b3/webapps/cocoon/mount/vquadrat/sitemap.xmap:135:36


But redirecting doesn't:

  <map:pipelines>

	<map:pipeline internal-only="true">
	  <map:match pattern="internal/*">
        <map:call resource="dynamic-page">
		  <map:parameter name="target" value="login"/>
        </map:call>
	  </map:match>
	</map:pipeline>


	<map:pipeline>
	  <map:match pattern="test">
	    <map:redirect-to uri="cocoon://mount/vquadrat/internal/login"/>
	  </map:match>
	</map:pipeline>

INFO    (2002-07-04) 15:07.42:395   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/RedirectToURINode:
Redirecting to 'cocoon://mount/vquadrat/internal/login' at file:/projects/haul/jakarta-tomcat-4.0.4-b3/webapps/cocoon/mount/vquadrat/sitemap.xmap:220:68
INFO    (2002-07-04) 15:07.42:395   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/ForwardRedirector:
Redirecting to 'cocoon://mount/vquadrat/internal/login'
DEBUG   (2002-07-04) 15:07.42:397   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/EnvironmentWrapper:
Setting uri (prefix=, uris=mount/vquadrat/internal/login)
DEBUG   (2002-07-04) 15:07.42:397   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/AbstractEnvironment:
Set the URI Prefix (OLD=mount/vquadrat/, NEW=)
INFO    (2002-07-04) 15:07.42:398   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/PreparableMatchNode:
Matcher 'wildcard' matched prepared pattern 'mount/*/**' at jndi:/localhost/cocoon/sitemap.xmap:461:37
DEBUG   (2002-07-04) 15:07.42:398   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/InvokeContext:
Current Sitemap Parameters:
PARAM: '2' VALUE: 'internal/login'
PARAM: '1' VALUE: 'vquadrat'
PARAM: '0' VALUE: 'mount/vquadrat/internal/login'

DEBUG   (2002-07-04) 15:07.42:399   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/AbstractEnvironment:
Changing Cocoon context
DEBUG   (2002-07-04) 15:07.42:399   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/AbstractEnvironment:
  from context(file:/projects/haul/jakarta-tomcat-4.0.4-b3/webapps/cocoon/) and prefix()
DEBUG   (2002-07-04) 15:07.42:399   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/AbstractEnvironment:
  to context(mount/vquadrat/) and prefix(mount/vquadrat)
DEBUG   (2002-07-04) 15:07.42:400   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/AbstractEnvironment:
  at URI mount/vquadrat/internal/login
DEBUG   (2002-07-04) 15:07.42:400   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/AbstractEnvironment:
New context is file:/projects/haul/jakarta-tomcat-4.0.4-b3/webapps/cocoon/mount/vquadrat/
INFO    (2002-07-04) 15:07.42:401   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/PipelineNode:
No pipeline matched request: mount/vquadrat/internal/login
WARN    (2002-07-04) 15:07.42:401   [sitemap] (/cocoon/mount/vquadrat/test) HttpProcessor[8080][0]/PipelineNode:
Resource not found in pipeline at file:/projects/haul/jakarta-tomcat-4.0.4-b3/webapps/cocoon/mount/vquadrat/sitemap.xmap:143:19

With line 143 being the begin of the externally visible pipeline.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


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


Mime
View raw message