You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Dirk Gronert <u1...@hs-harz.de> on 2004/07/02 14:12:47 UTC

Re: best place to store information

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


Re: best place to store information : another question

Posted by Dirk Gronert <u1...@hs-harz.de>.
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


Re: best place to store information : another question

Posted by Lionel Crine <cr...@4dconcept.fr>.
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.

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
> 

-- 
Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.46.06.90

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