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 JSP and the fly likes how to use jsp array in javascript? 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 » Java » JSP
Bookmark "how to use jsp array in javascript?" Watch "how to use jsp array in javascript?" New topic
Author

how to use jsp array in javascript?

Komal Arora
Ranch Hand

Joined: Sep 30, 2010
Posts: 91

Hey guys,

i have a jsp array as follows:



now i wish to use the array "word_list" in a javascript. Can anybody please suggest as to how i can do this?

thanks


OCPJP
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60071
    
  65

You'll need to recreate the data using a JavaScript construct. Remember, all a JSP is doing is creating an HTML page to send to the browser. That page can contain JavaScript text.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to use jsp array in javascript?
 
Similar Threads
parameter from jsp to javascript function?
How to write retrieved data into javascript Array?
resultset
how to print values on jsp page fetched from servlet
Using ResultSet