Bug 38653

Summary: "parameterMap.locked" message does not exist
Product: Tomcat 5 Reporter: Nicolas Ternisien <nicolas.ternisien>
Component: Servlet & JSP APIAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 5.5.14   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Nicolas Ternisien 2006-02-15 12:23:06 UTC
The Map returned from HttpServletRequest is in fact a specifical class, called
ParameterMap.

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
'parameterMap.locked'

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
"<code>ParameterMap</code>"

Bye !

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