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

  • Home
  • SEARCH
  • 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 1052075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:02:07+00:00 2026-05-16T17:02:07+00:00

I have simple JSP: <jsp:directive.attribute name=severity type=java.lang.String required=true/> <jsp:directive.attribute name=currentSeverity type=java.lang.String required=true/> <c:if test=${severity

  • 0

I have simple JSP:

<jsp:directive.attribute name="severity" type="java.lang.String" required="true"/>
<jsp:directive.attribute name="currentSeverity" type="java.lang.String" required="true"/>

<c:if test="${severity ne currentSeverity}">
    <c:url value="/session" var="url">
        <c:param name="severity" value="${severity}"/>
    </c:url>
    <li><a href="#" onclick="$.ajax({
        type: 'GET',
        url: '${url}',
        success: function() {
            window.location.reload();
        }
    });"><c:out value="${severity}"/></a></li>
</c:if>

But when I’m evaluate it servlet engine throws:

org.apache.jasper.JasperException:
  /WEB-INF/tags/severity-position.tagx(17,9) PWC6287: 
  The attribute prefix success does not correspond to any imported tag library

Somehow JSP engine thinks that $.ajax({...}); string is JSP EL expression (no matter what characters are placed between $ and {). When I backslash { or $ it’s all ok, but then my IDE thinks that this code is broken JS code.

So, why JSP engine thinks that $.ajax({...}) is JSP EL expression?

  • 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-16T17:02:08+00:00Added an answer on May 16, 2026 at 5:02 pm

    This look indeed like a bug in the EL implementation used by the servletcontainer (or webapplication) in question. You need to figure which one it is using and try upgrading/replacing it.

    If upgrading/replacing the EL implementation doesn’t help, then I’d warmly recommend do move that whole script out into an function in its own .js file which you load using <script> in the HTML <head> element. That’s also the normal practice. Even more, I’d give the link a classname so that you can just hook on it during $(document).ready() and add the click() accordingly. E.g.

    <a href="${url}" class="someName">
    

    with

    $(document).ready(function() {
        $('.someName').click(function() {
            $.ajax({
                type: 'GET',
                url: $(this).attr('href'), // This sets the actual value of ${url}.
                success: function() {
                    window.location.reload();
                }
            });
            return false; // Blocks link from executing the default href action.
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let say I have a simple form with no required fields: <form action=index.jsp method=post>
I have this simple Jsp page: <%@ page language=java import=java.awt.Color%> <% Color background =
I have a simple java application and want to embed it into a jsp
Im new to HTML, Java, Javascript, JSP, and JSTL. I have a simple JSP
I have a simple jsp/servlet application and I want to add AJAX feature to
I am learning Servlets/JSP/MVC and have a question about architecting a simple application. I
I have a simple jsp form that the customer uses to send us emails.
I have a pretty simple JSP/Servlet 3.0/Spring MVC 3.1 application. On one of my
I want to make a simple JSP parser by using Treetop. Now, I have
I have a simple JSP that contains checkbox and submit button: <form action=MappingSubmit.jsp enctype=multipart/form-data

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.