WebSphere Portal Server - Getting a text value into a portal theme

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > January 2004 > Getting a text value into a portal theme





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Getting a text value into a portal theme
rvarilla@us.ibm.com

2004-01-19, 3:00 pm

I have a number of links in a portal theme that are hard-coded to a
specific static server, but I would like the theme to be reusable in other
environments by having those links pick up a value from a property file
that could be set differently for each environment I deploy the theme to.
I figured I would do this the same way that the sample themes already pick
up values using the <wps:text> tag. I have a file Footer.jsp included in
Default.jsp that has the following line:

<a href='https://<wps:text key="fieldnet.host" bundle
="nls.Thrivent"/>/fahome/map/'>Site Map</a>

This is not picking up the value of key "fieldnet.host" from the new file
I
created called Thrivent.properties, nor from its related file
Thrivent_en.properties (which I added later, hoping that the
language-neutral file would be picked up) that I placed in the directory:


/usr/WebSphere/AppServer/installedApps/DAFAPOR001/wps.ear/wps.war/WEB_INF/classes/nls

If I replace this line with:

<a href='https://<wps:text key="link.my.portal" bundle
="nls.engine"/>/fahome/map/'>Site Map</a>

the JSP correctly picks up the text "my portal" from either
engine.properties or engine_en.properties in the same directory where I
placed the Thrivent files. Maybe I have the wrong directory, or maybe I
need to specify which property files are valid to load somewhere else.
Maybe the bundle first needs to be referenced in Default.jsp. Maybe I
really need to implement this code with JSTL like the Info Center suggests
(but why does the code still work for other property files?). Any help on
how to make this work would be appreciated.
Oliver Meyer

2004-01-19, 3:00 pm

Hi,
unfortunately, you did not say which portal server version you are
using. I assume (from the description of the directories) that it is
5.0. Is this correct.
You should try to place your file in the <PortalServer>/shared/app/nls
directory.
This directory also contains the language specific property files.

Moreover, possibly there are some entries in the portal server log files
that are helpful.

Oliver

rvarilla@us.ibm.com wrote:
quote:

>
> I have a number of links in a portal theme that are hard-coded to a
> specific static server, but I would like the theme to be reusable in
> other
> environments by having those links pick up a value from a property
> file
> that could be set differently for each environment I deploy the theme
> to.
> I figured I would do this the same way that the sample themes already
> pick
> up values using the <wps:text> tag. I have a file Footer.jsp included
> in
> Default.jsp that has the following line:
>
> <a href='https://<wps:text key="fieldnet.host" bundle
> ="nls.Thrivent"/>/fahome/map/'>Site Map</a>
>
> This is not picking up the value of key "fieldnet.host" from the new
> file I
> created called Thrivent.properties, nor from its related file
> Thrivent_en.properties (which I added later, hoping that the
> language-neutral file would be picked up) that I placed in the
> directory:
>
> /usr/WebSphere/AppServer/installedApps/DAFAPOR001/wps.ear/wps.war/WEB_INF/classes/nls
>
> If I replace this line with:
>
> <a href='https://<wps:text key="link.my.portal" bundle
> ="nls.engine"/>/fahome/map/'>Site Map</a>
>
> the JSP correctly picks up the text "my portal" from either
> engine.properties or engine_en.properties in the same directory where
> I
> placed the Thrivent files. Maybe I have the wrong directory, or maybe
> I
> need to specify which property files are valid to load somewhere else.
> Maybe the bundle first needs to be referenced in Default.jsp. Maybe I
> really need to implement this code with JSTL like the Info Center
> suggests
> (but why does the code still work for other property files?). Any
> help on
> how to make this work would be appreciated.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com