> From: Alexander Hartner [mailto:a...@j2anywhere.com]
> Subject: JSP Compilation issue after upgrade from 6.0.18 to 6.0.20
> 
> When I deploy my application on Tomcat 6.0.18 it all works just fine,
> however after upgrading to Tomcat 6.0.20 I get the following exception

When you have a problem like this, you might find something pertinent in the 
changelog; however, nothing popped out at me when I looked.

> org.apache.jasper.JasperException: Unable to compile class for JSP:
> An error occurred at line: 3 in the jsp file: /menu.jspf
> LinkedHashMap cannot be resolved to a type
> 1: <%...@page import="java.util.*"%>

Hmmm... I tried this simple JSP file under 6.0.20 with no problems:

<html>
<%@ page session="false" import="java.util.*"%>
<%!
LinkedHashMap<String, String> menuItems = new LinkedHashMap<String, String>();
public void jspInit() {
  menuItems.put("testKey", "testVal");
} %>
<body>
<p> testKey: <%= menuItems.get("testKey") %>
</body>
</html>

Perhaps there's a problem with whatever .jsp is pulling in the .jspf segment.  
Might try setting the system property:
    org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING
to false to see if that has an effect.

> I also tried moving the tools.jar to the lib folder as was 
> suggested on several posts I found online

Whoever suggested that is clueless about how classloaders work - that's an 
extremely bad idea, always.  Also note that Tomcat has not required the use of 
tools.jar since 5.5 came out.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to