aspose file tools*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 61043
    
  66

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.
 
 
subject: <bean:message> and jquery