Konstantin Piroumian wrote:

>Hi folks!
>
>
>1) I've been recently trying to modernize the Forrest's sitemap using input
>modules and found out that there is no input module for request properties
>(such
>as context path, locale, query string,etc.). And the name used for the
>request parameters module is misleading in this regard.
>
>I don't remember how the discussion about module names ended, but I'd like
>to propose to change the names for modules as below:
>
>    1. request - for RequestModule (I volunteer to implement it), to provide
>access to context path, locale, uri, url, query string     and all other
>properties of Request interface.
>
>    2. request-param - either of this for request parameters
>
>    3. request-attr - either of the for request attributes
>
>    4. session - for a module for Session properties, such as id, isNew,
>etc.
>
>    5. session-attr - for session attributes
>
>    6. application - for a module for application context (Context)
>properties, in case of web environment it's the ServletContext properties.
>
>    7. application-attr - web application context attributes (servlet
>context attributes)
>
>If we agree on this, I am volunteering to implement the RequestModule (or
>maybe RequestPropertiesModule) and if I have time then I'll also implement
>the modules related to session and application.
>  
>

I like this, as it introduces a clean and uniform way to access the 
various elements of the environment. Also "request", "session" and 
"application" are the names used by JSP to define bean scope, and it's 
good to stick to these well-known terms.

+1 !

What's missing here are request headers. IIRC, we already have "header" 
for it, but wouldn't "request-header" be more consistent ?

>2) Now a question:
><question>
>First usage of input modules in Forrest for site skin selection showed me
>that having passive modules (that implement only the 'getter' functionality)
>is not sufficient. In case of the skin when user chooses to use another
>'skin' he should pass a 'skin' request parameter. But the problem is that
>this parameter is not retained through the user's session and you should
>either generate all the site links with this parameter or somehow set a
>session attribute or a cookie
>
>The same is true for the user's locale. I've been thinking about replacing
>the LocaleAction with an input module, but I am in doubts if I should set
>user's locale in an input module? This involves setting a request or session
>attribute and/or a cookie.
></question>
>
>Any suggestion or a better solution is appreciated.
>  
>

IMO, it makes perfect sense to have a "set-module" action that can be 
used to set values, of course only for modules where it makes sense (you 
can set a request attribute, but not a request parameter).

And then, don't we need also need a "response-header" module ?

Sylvain

-- 
Sylvain Wallez
 Anyware Technologies                  Apache Cocoon
 http://www.anyware-tech.com           mailto:[EMAIL PROTECTED]




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

Reply via email to