cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Gronert <u15...@hs-harz.de>
Subject Re: best place to store information : another question
Date Mon, 05 Jul 2004 04:58:06 GMT
Lionel Crine wrote:
> Ok, I'll try one the two ways.
> 
> 
> Another question :
> 
> If I want to set some parameters, is there a place.
> These parameter have to be set before the application starts.
> 
> by now, I put them into the web.xml but I'm not sure this is for the 
> best. I always forget each time I install the application.

Maybe with the help of:

(1) the sitemap-variable?!, e.g.:

   <map:pipelines>
     <map:component-configurations>
       <global-variables>
         <diagramHeight>530</diagramHeight>
         <diagramWidth>325</diagramWidth>
       </global-variables>
     </map:component-configurations>
     ...
    </map:pipelines>

    use, e.g.:
    <map:parameter name="psServer" value="{global:psServer}"/>

(2) the PropertiesFileModule?!, e.g.: look at the cocoon.xconf

     <component-instance
  class="org.apache.cocoon.components.modules.input.PropertiesFileModule"
  logger="core.modules.input"
  name="cocoon-properties">
       <file src="resource://org/apache/cocoon/cocoon.properties"/>
     </component-instance>
	
     you can create another instance, with a unique name, and set there
     your propertie-file.

     use, e.g.:
     <map:parameter name="psServer" value="{your-instance-name:test}"/>


Regards

Dirk

> 
> Dirk Gronert wrote:
> 
>> Lionel Crine wrote:
>>
>>> Hi all,
>>>
>>> I have to store some information about the users in my application.
>>>
>>> Today, I store them into the session object 
>>> (org.apache.cocoon.environment.Context) using a custom action.
>>>
>>> I think, there are other ways to do that and I need some advices to 
>>> manage this information.
>>>
>>> Am I doing the right thing ? Is there another way to do that (I saw 
>>> the sessiontransformer)?
>>
>>
>>
>> You are right! You have the possibility to use the SessionTransformer.
>>
>> But there is also another way using the SessionAttributeOutputModule. 
>> With the help this output-modul you can store something in a 
>> session-attribut. I found no special documentation, only the 
>> java-source-code!
>>
>> i hope i could give you a little help!
>>
>> Dirk
>>
>>>
>>>
>>> PS: I'm pretty sure that there is already an implementations of my 
>>> needs in Cocoon.
>>>
>>>
>>> Lionel
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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