AW: [opencms-dev] Fighting with Global VARs and Configs

Anatol opencms at recordcaster.de
Fri Dec 16 17:32:50 CET 2005


Hi Kai,

the cms.link-Feature didn't work in the @include tag. If I understand it 
right, a plaintext filename is required. A cms.link raises an error :-(

Regards
Anatol


Kai Schliemann schrieb:

>Hi Anatol,
>
>for your first approach (@ include) you just have to clear the flex cache
>after changing the included file.
>Absolute paths should work as well (use "cms.link" to make sure it works in
>both off- and online project). Although I never tested it.
>
>HTH
>
>Regards
>
>Kai
>
>  
>
>>-----Ursprüngliche Nachricht-----
>>Von: opencms-dev-bounces at opencms.org
>>[mailto:opencms-dev-bounces at opencms.org]Im Auftrag von Anatol
>>Gesendet: Freitag, 16. Dezember 2005 12:02
>>An: The OpenCms mailing list
>>Betreff: [opencms-dev] Fighting with Global VARs and Configs
>>
>>
>>Hi All!
>>
>>I just develop a complex webapp and have many params which I need in
>>many JSPs. For example: CONTENT_DIR, IMAGE_DIR, ARTICLE_CONF,
>>HEAD_WIDTH, FOOT_HEIGHT, etc.
>>Some params are absolute terms, but some have to calculate for every
>>pagerequest.
>>
>>What is the best way to configure theses constant VARs: within a
>>XmlContentFile (very user friendly! :) but what says the performance? )
>>or in a simple textfile like:
>>----
>>...
>>String HEAD_WIDTH = "500";
>>String FOOT_WIDTH = "500";
>>String HEAD_HEIGHT = "200";
>>String FOOT_HEIGHT = "100";
>>String FOOT_COLOR = "#AA13BC";
>>...
>>----
>>
>>And what is the best way to import these VARs into the several JSPs?
>>
>>The <%@ include file="all_the_vars_file" %> is very unhandy, cause if I
>>change a line in the included file "all_the_vars_file", I've to reopen
>>and save all the files used the file "all_the_vars_file". Upto 3 files
>>no problem ;) but I've round about 30 files (or more?) in diffrent
>>folders - very unlovely ;)
>>A second problem is, it seems I can only include relative pathnames :/
>>
>>The other way <cms:include file="all_the_vars_file"> works here for the
>>first view much better. Changing the VARs in "all_the_vars_file" and
>>including is plain sailing. But: to access the VARs is very ugly :( The
>>cms:included file have their own namespace. So all the VARs I've to fire
>>into the request ( request.setAttribute("VAR_NAME", VAR_VALUE);  ). And
>>in every JSP needing some VARs I 've to fishing in the request for them.
>>( request.getAttribute("VAR_NAME") ) That results in inflated
>>request.getAttribute-Blocks.
>>
>>How to solve that? Have you any idea? Many thanks!
>>Anatol
>>
>>
>>_______________________________________________
>>This mail is send to you from the opencms-dev mailing list
>>To change your list options, or to unsubscribe from the list, please visit
>>http://mail.opencms.org/mailman/listinfo/opencms-dev
>>    
>>
>
>
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>
>  
>




More information about the opencms-dev mailing list