tomcat6-6.0.24 throw exception "Unable to compile class for JSP" when using the tag bean:define with same variable many times in jsp

Solution Verified - Updated -

Issue

  • tomcat6-6.0.24 throw exception "Unable to compile class for JSP" when using the tag bean:define with same variable many times in jsp files.

What is the cause of following messages at runtime ?

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: <LINE_NUM> in the generated java file
Duplicate local variable <VARIABLE_NAME>

Environment

  • Red Hat Enterprise Linux 6.0~6.2
  • tomcat6-6.0.24

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content