struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Frosch" <>
Subject <html:link> Request Parms Use Name NOT ParamName
Date Fri, 22 Feb 2002 20:05:48 GMT

The HTML TagLib Developer Guide.pdf says,

"To pass multiple dynamic parameters, you can store them in a
java.util.Map, and use the name of the
map for the ***paramName***. The map must then contain one or more
paramIds and their corresponding
values. As the Map is processed, the keys are assumed to be the names of
query parameters to be appended.
The value associated with each key must be either a String or a String
array representing the parameter
value(s). If a String array is specified, more than one value for the
same query parameter name will be
created." [*** notes my emphasis]

After unsuccessfully struggling to get my parameter map to work, I broke
down and reviewed the LinkTag source code.  To construct the parms, it
relies on the computeParameters method in RequestUtils.  That method has
the following code snippet:

  // Locate the Map containing our multi-value parameters map
  Map map = null;
  try {
    if (name != null)
      map = (Map) lookup(pageContext, name, property, scope);
  } catch ...

So it seems, the paramName attribute is not the one to use, but the name
parameter is.  I assigned the Map name to the name attribute and it

Maybe the docs are wrong.  Maybe the RequestUtils computeParameters
method is wrong.  Maybe I just got it all wrong.  I'm not sure which,
but finally my code works.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message