Bug 38653 - "parameterMap.locked" message does not exist
"parameterMap.locked" message does not exist
Product: Tomcat 5
Classification: Unclassified
Component: Servlet & JSP API
All All
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2006-02-15 12:23 UTC by Nicolas Ternisien
Modified: 2006-02-16 08:37 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Ternisien 2006-02-15 12:23:06 UTC
The Map returned from HttpServletRequest is in fact a specifical class, called

This map does not allow to modify any key or value of it, and in the case the
user tries to, it launches a IllegalStateException. 

The problem is that the key string used does not exist.

So to fix this bug you need to add the parameterMap.locked key/value in
properties files of the Servlet API.

Begin of the trace :
javax.servlet.ServletException: Cannot find message associated with key

There is also a little-little bug in the Javadoc of ParameterMap class :

 * Extended implementation of <strong>HashMap</strong> that includes a
 * <code>locked</code> property.  This class can be used to safely expose
 * Catalina internal parameter map objects to user classes without having
 * to clone them in order to avoid modifications.  When first created, a
 * <code>ParmaeterMap</code> instance is not locked.
 * @author Craig R. McClanahan
 * @version $Revision: 302726 $ $Date: 2004-02-27 09:59:07 -0500 (Fri, 27 Feb
2004) $

public final class ParameterMap extends HashMap {

The "<code>ParmaeterMap</code>" string should be replaced by

Bye !

PS: This bug also occurs in Tomcat 3 and 4.