struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <>
Subject Re: how to set global constants cross all of the scripts ?
Date Thu, 09 Aug 2007 20:49:42 GMT
Another alternative would be to put those definitions into a resource 
bundle (properties file). As long as all references are indirected 
through some collection of definitions, it doesn't really matter where 
those definitions are stored / setup :=)


Paul Benedict wrote:
> If you want to link to absolute URLs, perform a JSP include at the top of
> your pages. The included page should contain all the definitions you need.
> Alternatively, you can write yourself a ContextListener to put attributes
> into application scope.
> If you want to link to other Struts actions, use the actionId attribute.
> Paul
> On 8/7/07, john lee <> wrote:
>> inside jsp/struts 1.3, how can i set global constants that i can make
>> change one place, but can make all the corrspondent change cross all the
>> files.
>>   for example, if i have script file 1.jsp, 2.jsp ......n.jsp, all the
>> file contains
>>        <a href="">
>>   any way i can set it as <a href="@website">, then i change one place,
>> could make change all the scripts?
>>   tks in advance
>>   john
>> ---------------------------------
>> Moody friends. Drama queens. Your life? Nope! - their life, your story.
>> Play Sims Stories at Yahoo! Games.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message