This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Struts and the fly likes <bean:message> and jquery Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "<bean:message> and jquery" Watch "<bean:message> and jquery" New topic
Author

<bean:message> and jquery

Naveen puttu
Ranch Hand

Joined: Sep 15, 2009
Posts: 88
Hi

I have a variable timeZone which i get after parsing the xml . i print this value and i see that the value is EST as expected

Now im trying to do as follows



Im using struts, so <bean:message key="timeZone"/> picks the value from the properties file

i get the error message




Am i trying to achieve something impossible
Naveen puttu
Ranch Hand

Joined: Sep 15, 2009
Posts: 88
i basically think that this is achievable , however the value timeZone i get after parsing the xml is text

and bean:message tag key attribute expects a string

am i correct
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60082
    
  65

This has nothing to do with jQuery -- it's a Struts issue. You need to make sure that whatever is generated is valid HTML and javaScript.

Moved to the Struts forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

It doesn't really have anything to do with Struts, either; the initial JavaScript being generated is wrong. You need to quote the value--just look at the JavaScript being generated; it's obviously invalid.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: <bean:message> and jquery
 
Similar Threads
I want to enable submit button only when i check the checkbox
set html option value by bean: message key=...
anybody know how to get property in a Form?
Problem with TimeZone.getDefault().getID() API
retrieve value from property file from a variable