This constant consternation regarding constants is a refrain that resonates strongly with me. When I first started writing JSP pages without scriptlets and scriptlet expressions, the inability to easily referenceclass constants was a sorely missed capability.
In this article, the term class constant is used to mean a class field with the modifiers public
, static
and final
.
I even flirted with cheating a little by using scriptlet expressions to reference class constants in otherwise scriptless pages. This dalliance didn't last very long as not only did it violate my sense of architectural integrity, it broke down in places where scriptless body content must be maintained (for example: within tag files and within the bodies of custom actions based on SimpleTag
).
One particular area in which I felt the pain most intensely was in the naming of the form elements within an HTML
No comments:
Post a Comment