File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "<bean:message> and jquery" Watch "<bean:message> and jquery" New topic

<bean:message> and jquery

Naveen puttu
Ranch Hand

Joined: Sep 15, 2009
Posts: 88

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

Joined: Jan 10, 2002
Posts: 63858

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] [About Bear] [Books by Bear]
David Newton

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:
subject: <bean:message> and jquery
jQuery in Action, 3rd edition