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. com.plok.app.constants.Keys) 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
constants?
Am I getting my knickers in a twist over nothing?
-Miles
Miles Daffin
Morgan Stanley
20 Cabot Square | Canary Wharf | London E14 4QA | UK
Tel: +44 (0) 20 767 75119
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does
not waive confidentiality or privilege, and use is prohibited.