JSP compilation error: Duplicate local variable _jspx_temp0

Solution Verified - Updated -

Issue

  • The following is observed in the server log and/or in the JSP page output:
    07:28:23,199 ERROR [ContainerBase] Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    
    An error occurred at line: 12 in the jsp file: /pages/myPage.jsp
    Duplicate local variable _jspx_temp0
    9: <dsp:getvalueof var="contextPath" vartype="java.lang.String" value="${originatingRequest.contextPath}" />
    10: <dsp:getvalueof var="httpLink" vartype="java.lang.String" value="${httpServer}${contextPath}" />
    11:
    12: <cast:pageContainer >
    13:
    14: <jsp:attribute name="messageBody">
    15:
    

Environment

  • JBoss EAP 4.2.0 CP09 / 4.3.0 CP08 or earlier.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In