Hi all,

I get this weird bug(?) with TextTool.
On my struts-config.xml I declare the following message resource

<message-resources parameter="DestinationsResources" key="destinations" />

then in my template I use the textool to retrieve a value from that resource

$text.get('title.img', 'destinations')

and I get a ClassCastException with the following stack trace,
------------------------------------------------------------
java.lang.ClassCastException
 at org.apache.velocity.tools.struts.StrutsUtils.getMessageResources(Unknown 
Source)
 at org.apache.velocity.tools.struts.MessageResourcesTool.getResources(Unknown 
Source)
 at org.apache.velocity.tools.struts.MessageTool.get(Unknown Source)
 at org.apache.velocity.tools.struts.MessageTool.get(Unknown Source)
....
------------------------------------------------------------

changed the "key" of the message resource to "destination" (notice the 's' 
missing)

using the new key value... and it works :/

thats using velocity-tools-1.1

I also have other resources that use the same notation, 
<message-resources parameter="IndexResources" key="index" />

and cause me no problems.

Thanks in advance,
Markos Charatzas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to