You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Daniel Curran <dc...@directthought.com> on 2007/08/14 14:20:13 UTC

Access Servlet Context in Sitemap

In our application we are currently doing a couple of different generation
styles.

<map:generate type="request"/>

or we generate off an aggregate

<map:aggregate element="aggregate">
  <map:part src="cocoon:/internal/request"/>
  <map:part src="xmodule:session-attr:sessionData"/>
</map:aggregate>

We have configuration data which is stored in an external configuration file
which we set on the servlet context. The problem is I do not know how to get
this data into the sitemap so that it can be used by any of our follow-on
transforms.

The ways that I have thought of doing this would be do create a filter which
adds this information onto the sessionData object that we are using, or to
write a custom generator to serialize this information.

Is there an easier built-in method, or a standard method that should be used
to get access to the servlet context?

Thanks,
Dan Curran

Re: Access Servlet Context in Sitemap

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Daniel Curran pisze:
> In our application we are currently doing a couple of different 
> generation styles.
> 
> <map:generate type="request"/>
> 
> or we generate off an aggregate
> 
> <map:aggregate element="aggregate">
>   <map:part src="cocoon:/internal/request"/>
>   <map:part src="xmodule:session-attr:sessionData"/>
> </map:aggregate>
> 
> We have configuration data which is stored in an external configuration 
> file which we set on the servlet context. The problem is I do not know 
> how to get this data into the sitemap so that it can be used by any of 
> our follow-on transforms.
> 
> The ways that I have thought of doing this would be do create a filter 
> which adds this information onto the sessionData object that we are 
> using, or to write a custom generator to serialize this information.
> 
> Is there an easier built-in method, or a standard method that should be 
> used to get access to the servlet context?

It depends on Cocoon version you use. Do you use 2.1 or 2.2?

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/
*** My Internet Service Provider breaks my internet connection                ***
*** incessantly so I'll not be able to respond to e-mails                     ***
*** regularly and my work will be somehow irregular.                          ***
*** I'm already trying to switch ISP but it will take handful amount of time. ***

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