Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Incomplete
-
Future
-
None
-
None
-
Operating System: All
Platform: All
-
32614
Description
The populate method of org.apache.struts.util.RequestUtils with the following
signature
public static void populate(
Object bean,
String prefix,
String suffix,
HttpServletRequest request)
throws ServletException {
..
}
uses a "properties" HashMap for storing request parameters passed in from an
HTTP request.
Please change this to an java.util.LinkedHashMap so that the
order of the parameters (when posted through an HTML form) is retained.
The "properties" map is eventually passed to the BeanUtils.populate(...)
method. Since this method calls indexed setter/getter methods in the order of
the entries in the map passed to it. It only makes sense to have this order
in line with whats submitted.
Not doing so, is causing erratic behavior when dealing with indexed properties
in Struts.