struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kawczynski, David" <>
Subject RE: Making strings in available to Javascript
Date Mon, 15 Sep 2008 17:41:56 GMT
Devils advocate: do the ends justify the means?

Assuming the javascript you speak of exists in a js file (not a jsp
If the struts filter is mapped to '/' you can include a struts taglib on
the js file, and use ognl to look up global-properties.

I'd caution against this, as the average javascript developer will cuss
you for changing their otherwise static world.  

-----Original Message-----
From: Michael Pelz Sherman [] 
Sent: Monday, September 15, 2008 12:51 PM
Subject: Making strings in available to

I'd like to stop putting hard-coded strings (error messages and such) in
our javascript code.

I'm considering writing a class that runs at startup & generates a
javascript file that contains all of the strings from in javascript class.

Is there a better approach?

- mps
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.

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

View raw message