Hi,

I think I found the reason for the described problem - although no solution.

Is it correct, that the "miracle" of super call is done in
ServletServiceContext.PathDispatcher.forward(..)?

If yes, the problem is, that the method call

ServletServiceContext.this.servlet.service(request, wrappedResponse);

(line 469 of ServletServiceContext.java) throws a
ResourceNotFoundException instead of response with error code 404. The
execution therefore continues in the finally block (line 484), never
calling the super servlet, as the status code of the response is never
checked.

The old (2.2.0-RC2) version of ServletServiceContext did directly catch
this Exception and did trigger a super call, as either an exception or
status code < 200 or >= 400 is considered.

Is this behaviour due to a misconfiguration of mine or is it a bug?

Regards
Niko



Nikolas List schrieb:
> Hi all,
> 
> I have problems to configure two cocoon blocks, where one is a
> descendant of the other (via the special "super" connection) as
> described in [1]. Following the description there I would expect that
> accessing an URL block1/testURL, for which no matcher in the block1s
> sitemap exists, should be passed to the servlet mounted under block2.
> This doesn't seem to be the case.
> 
> To be more concrete the setup is the following: I created two simple
> blocks as described in [2].
> 
> In block1/src/main/resources/COB-INF/sitemap.xmap I deleted the matcher
> "spring-bean" serving the bean example.
> 
> I added a dependency to block2 in block1/pom.xml and linked block2 as
> super-block in
> block1/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml
> as follows:
> 
>  <bean name="test.block1.service"
> class="org.apache.cocoon.sitemap.SitemapServlet">
>     <servlet:context mount-path="/block1"
> context-path="blockcontext:/block1/">
>       <servlet:connections>
>         <entry key="super" value-ref="test.block2.service"/>
>       </servlet:connections>
>     </servlet:context>
>   </bean>
> 
> Accessing the URL localhost:8888/block1/spring-bean I would expect the
> output generated by block2 as follows:
> 
> <demo>
>   <module>org.test:block2-old</module>
>   <spring>#message</spring>
> </demo>
> 
> The truth is: I get a 404 http error.
> 
> Do I missunderstand the concept of inheritance in the
> servlet-service-framework or is there any misconfiguration in my simple
> example?
> 
> The most astonishing thing is, that it worked out of the box using the
> archetypes from RC2 (1.0.0-RC2 (cocoon-core: 2.2.0-RC2,
> cocoon-servlet-service-components: 1.0.0-RC1)).
> 
> Any help is appreciated.
> 
> Regards
> Niko
> 
> 
> 
> [1]
> http://cocoon.apache.org/subprojects/servlet-service/1.1/servlet-service-impl/1.1/1412_1_1.html
> [2]
> http://cocoon.apache.org/2.2/1291_1_1.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to