This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes passing resource key to javascript function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "passing resource key to javascript function" Watch "passing resource key to javascript function" New topic
Author

passing resource key to javascript function

Neeraj Vij
Ranch Hand

Joined: Nov 25, 2003
Posts: 315
Hi,

I want to pass the value of resource key defined in the property file to a javascript function. I am getting error while using the following code snippet. please provide some poniters



thanks
neeraj
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

As you've discovered, you can't nest tags like that--that's simply not valid JSP. You'd need to set the value to a variable and use either JSP 2+ EL, or the Struts EL tags if you're not running in a JSP 2+ container.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: passing resource key to javascript function