• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can we use JSTL in Javascrpt

 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi the column names of my table are in a container. So in my jsp page when i need them i use JSTL something like this



Now the problem is i am using an open source java script grid to display my data this grid also requires the name of the columns.
Function is


Now can i ue the jstl in javascript function to write own the column names. is that possible if so how would i accomplish that ??
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like HTML markup, JavaScript code is just template text in the JSP. So you can use the JSTL anywhere on the page and the values will be substituted prior to sending the HTML to the browser.

What does not happen is that the JSTL be evaluated on the client as the JavaScript is running. Remember that all a JSP is is a template for an HTML page.

If you haven't read it yet, please read this article which may be helpful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic