Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
Struts 1: style, view, and properties files
James Lee
Ranch Hand
Posts: 36
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Based on convention, a style should be kept in a view or in a properties file? e.g. is option 1 or option 2 preferred in the following?
Option 1
<%-- login.jsp --%> ... <h1><bean:message key="user.name"/></h1> ...
#messageResource.properties user.name = User Name ...
Option 2
<%-- login.jsp --%> ... <bean:message key="user.name"/> ...
#messageResource.properties user.name = <h1>User Name</h1> ...
Thanks.
Merrill Higginson
Ranch Hand
Posts: 4864
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
My preference is for option1 for two reasons:
It's confusing to have style elements both in the
JSP
and in the properties files, making it difficult to debug problems
The combination of tags in the properties file and those in the JSP can cause unexpected results.
Merrill
Consultant,
Sima Solutions
James Lee
Ranch Hand
Posts: 36
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Merrill. I'll take your suggestion.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
error in form display?
how to pass a string and variable as value on a tag?
Multipls message bundle resource error
Struts Exception
DispatchAction No action instance for path ...
More...