struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daffin, Miles (Company IT)" <>
Subject Constants for property names
Date Thu, 10 Feb 2005 17:30:40 GMT
Hi All,
What do people feel about using constants for property names?
In general I feel one should use constants for such things, but it is
far from easy in a web app to do so.
If I define a constants class (e.g. I can
use this in everywhere in java code and in *most* (not all) places in
the jsps. For example this works: 
<html:text property="<%=Keys.Section0.APPLICANT_NAME%>"/>
but this does not:
<jsp:param name="<%=Keys.APPLICANT_NAME%>" value="What Ever"/>
I have the same problem if I want to refer to this property in any of
the following places:
- jstl tags
- xml files (e.g. struts-config, validation)
Do you see what I mean?
So, what am I doing/thinking wrong? Should I forget about defining
Am I getting my knickers in a twist over nothing?
Miles Daffin
Morgan Stanley
20 Cabot Square | Canary Wharf | London E14 4QA | UK
Tel: +44 (0) 20 767 75119 <> 
NOTICE: If received in error, please destroy and notify sender.  Sender does not waive confidentiality
or privilege, and use is prohibited. 

  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message