aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes can we use JSTL in Javascrpt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "can we use JSTL in Javascrpt" Watch "can we use JSTL in Javascrpt" New topic
Author

can we use JSTL in Javascrpt

Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 230
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

Joined: Jan 10, 2002
Posts: 61413
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can we use JSTL in Javascrpt