cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathias Wiegard <Mathias.Wieg...@student.uni-ulm.de>
Subject Re: Including - another problem
Date Sun, 26 Oct 2003 13:49:03 GMT
You include the xsp-Page as pure xml.. it hast to be compiled at runtime
because a xsp represents java-code. That's the job of the
serverpage-generator. Aside from that, your call of the xsp with the
"src"-Attribut searches for an matcher that matches
"resource/content/header" in the current sitemap. If you want to include
static xml-content you can use the "resource:" protocol (see the manual:
sitemap) in the future. But because of you have to compile with the
serverpage generator, do define a pipeline like this:

<map:match pattern="*.xsp">
    <map:generate src="resources/content/{1}.xsp" type="serverpages"/>
    <map:serialize type="xml"/>
</map:match>

Remember that this pipeline has to be in the "auth-protect"-Action to have
the authentication-Context! ;)

The line in the main document would look like:

<cinclude:include src="cocoon:/header.xsp"/>

hope it helps, enjoy the world of cocoon ;)
Mat


> Von: Jan Wielgus <list40@o2.pl>
> Antworten an: users@cocoon.apache.org
> Datum: Sun, 26 Oct 2003 14:33:37 +0200 (MET DST)
> An: users@cocoon.apache.org
> Betreff: Including - another problem
> 
> Hi again,
> 
> the stuff with cinclude works, but there is a problem, that only a
> static text is being included. My include "header.xsp" file contains
> the following:
> 
> <?xml version="1.0"?>
> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0"
> xmlns:session="http://apache.org/xsp/session/2.0"
> xmlns:xsp-session="http://apache.org/xsp/session/2.0"
> xmlns:xsp-session-fw="http://apache.org/xsp/session-fw/1.0"
> xmlns:cinclude="http://apache.org/cocoon/include/1.0"
>> 
> <message>
> Hallo, <xsp-session-fw:getxml
>        context="authentication"
>        path="/authentication/data/lastname"/>
> </message>
> </xsp:page>
> 
> And I include it in my main-document with:
> 
> <cinclude:include src="resources/content/header.xsp"/>
> 
> But only the word "Hallo" is in output on the main page.
> On the other hand, when I call "header.xsp" explicitly, than I see
> the result of <xsp-session-fw> on the screen.
> 
> What may be the problem?
> 
> Jan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


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


Mime
View raw message