Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6029879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:57:10+00:00 2026-05-23T04:57:10+00:00

I’ve been using the jQuery tmpl library for some projects and really liking it.

  • 0

I’ve been using the jQuery tmpl library for some projects and really liking it.

I’m not using it on a small project that needs to be in JSP, and things got strange. It is not working fully.

<script id="servicesRow" type="text/x-jquery-tmpl">
    <tr id="id_${id}">
        <td>${name2}<br />${id}</td>
        <td>${supported_roles}</td>
        <td><button class="edit">Edit</button></td>
        <td><button class="delete">Delete</button></td>
        <td><a href="#">Show clients</a></td>
    </tr>
</script>

I was trying to understand why no data was showing up. Turns out some kind of parsing is happening of text in the page that looks like ${foo}. So when I view source on my page all those elements have been replaced, like this:

<script id="servicesRow" type="text/x-jquery-tmpl">
    <tr id="id_">
        <td><br /></td>
        <td></td>
        <td><button class="edit">Edit</button></td>
        <td><button class="delete">Delete</button></td>
        <td><a href="#">Show clients</a></td>
    </tr>
</script>

Which is still usable as a template, but then jQuery tmpl can’t do its job. I get lots of empty rows.

The syntax matches some documentation I’ve found for JSTL. But I’ve not, that I can tell, installed that. I’m developing on stock, current Tomcat on Windows 7 and building up an app in my webapps/ folder from scratch. I’ve not, that I can tell, enabled anything like this, and I’m surprised that bare ${} is getting parsed (as opposed to things more like <%= %>, which would be more common as from PHP or ASP and similar.

So my question: how do I turn off this parsing behavior for my jQuery tmpl templates? Globally, locally to the individual JSP, or escape it (I’ve tried extra braces, I’ve tried backslashes, I’ve tried various quotes). I think Ideally there would be something like:

<foo:stopParsingMyDollarSignsAndBracesPlease>
<script id="servicesRow" type="text/x-jquery-tmpl">
    <tr id="id_${id}">
        <td>${name2}<br />${id}</td>
        <td>${supported_roles}</td>
        <td><button class="edit">Edit</button></td>
        <td><button class="delete">Delete</button></td>
        <td><a href="#">Show clients</a></td>
    </tr>
</script>
</foo:stopParsingMyDollarSignsAndBracesPlease>

Any help or ideas are appreciated. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:57:11+00:00Added an answer on May 23, 2026 at 4:57 am

    The ${} notation is Expression Language. You can turn it off on a per-JSP basis by

    <%@page isELIgnored="true" %>
    

    Or on an application-wide basis by the following in web.xml:

    <jsp-config>
        <el-ignored>true</el-ignored>
    </jsp-config>
    

    Or if you actually would like to use EL elsewhere in the JSP, then you just have to escape the ones in jQuery template by \. You’d really like to avoid the old fashioned scriptlets.

    <tr id="id_\${id}">
    

    Or you could just drop all that JS code in its own JS file (if supported by jQuery tmpl).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.