> Bert Van Kets wrote:
>
> It works,
> Thanks a lot.
> I did not add the application parameter through.  I might need it later,
> but the session context is accessible without it.
> I'm sorry for my stupidity in not seeing the parameter.  I must have
> overlooked it at least three times.  I'm still puzzled about something
> though.  When I log into the sunSpot portal in the latest CVS
> build (which
> is using "sunspotdemohandler" as the handler) and then access the session
> context with a handler called "sunRise", I get the context too!!  This is
> why I assumed that the default handler to store the values was called
> "sunRise". I didn't automatically link the handler to the name of the
> context.  Stranger still: when I try to access the context using
> "sunspotdemohandler" (the name of the handler in the cocoon
> portal) as the
> context name, I can't access it.
>
> The sitemap:
> <map:match pattern="sunspotdemo**">
>          <map:act type="sunRise-auth">
>                  <map:parameter name="handler"
> value="sunspotdemohandler"/>
>                  <map:parameter name="application" value="sunspotdemo"/>
>
> This works:
> <resource xmlns:sunshine="http://cocoon.apache.org/sunshine/1.0";>
>          <sunshine:getxml context="sunRise" path="/"/>
> </resource>
>
This is the correct use.

> This doesn't:
> <resource xmlns:sunshine="http://cocoon.apache.org/sunshine/1.0";>
>          <sunshine:getxml context="sunspotdemohandler" path="/"/>
> </resource>
>
> Can you explain this behavior, please?
>
And this not. :)

The handler definition is to link pipelines or documents to an application.
Which means all documents (pipelines) belonging to one application should
be "protected" (or surrounded) by the sunRise-auth action with the same
handler name. In the case of the portal this is the sunspotdemohandler.
This is the configuration of the sitemap - it tells sunRise that a
particular
document (pipeline) belongs to the application called sunspotdemohandler.

All the information from sunRise of this application is for each application
stored into a session context called "sunRise". As the pipeline is already
connected to the corresponding handler via the sitemap, the
<sunshine:getxml context="sunRise" path="/"/> knows that the information
of the handler sunspotdemohandler is requested.

This simplification allows you to develop your application independent from
your handler/sitemap configuration. You can switch a pipeline to a different
application with only changing the sitemap, but without touching the
pipeline
itself.

HTH
Carsten


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

Reply via email to