Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP with JavaScript

 
anuraag kb
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got a Jsp doubt.......i have passed a 2 dimensional string array from servlet into jsp using session.getAttribute()......is there any way to pass this 2-D array into a JavaScript function in the same jsp page...?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not directly. JSP runs on the server, JavaScript on the client. Please read this article to understand how JSP operates.

What you can do is to use JSP to "write" the JavaScript necessary to re-create the data on the page in JavaScript format.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!