aspose file tools*
The moose likes Struts and the fly likes Struts Message-Resources Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Message-Resources" Watch "Struts Message-Resources" New topic
Author

Struts Message-Resources

Yogendra Joshi
Ranch Hand

Joined: Apr 04, 2006
Posts: 213
Hey Friends ,

In my team when i joined the struts-config had already been written , I am able to understand each and every element what it has been used for , However , the attribute in <message-resources> element which states null="false". I dont know why this attrib has been written and what it does..

Can someone shred some light on this please ?

Thanks in Advance
Yogendra Joshi.


Meri Zindagi Hain Tab Tak.. Jab Tak Tera Sahara.... Har Taraf Tu Hi Tu Hain SAI Tera Hi Hain Nazara.....
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
A good source to go to for questions about the struts-config file is the DTD itself:

http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd

It's very well commented and will tell you about each element and attribute. Here's what it says about the null attribute in <message-resources>:
Set to "true" if you want our message resources to return a null string for unknown message keys, or "false" to return a message with the bad key value.


This means that null="true" causes a <bean:message> tag with a bad key to show nothing on the page. A null="false" entry causes a bad key to show as ??bad.key??.
[ September 29, 2006: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
Yogendra Joshi
Ranch Hand

Joined: Apr 04, 2006
Posts: 213
Oh Ok..

That was so easy explaination by Merrill...

I really like your explainations Merrill.. Thanks for helping us so fast.

Best regards ,

Yogendra Joshi.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
You're very welcome. Good luck with your project.
 
Consider Paul's rocket mass heater.
 
subject: Struts Message-Resources