struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jackson, Allan" <allanjack...@ku.edu>
Subject Struts losing parameters
Date Thu, 13 Apr 2017 13:55:50 GMT
We’re having a problem where struts (2.5.10.1) is losing parameters that were passed to an
action from a form. Our form is submitting values for a list of checkboxes like this:

selected[0]: true
selected[1]: true
selected[2]: false
selected[3]: true
...
selected[499]: false
selected[500]: true

This corresponds to a variable in our action that looks like:
private List<Boolean> selected;
//getter() and setter() here.

The issue we’re having is that when we get into our action code, the “selected” list
only ever has the first 256 items that we submitted. I manually pulled the list of parameters
out of the ActionContext, and they were all there, so I think the problem is probably happening
in the Params Interceptor.

I tried changing our List<> variable to an Array[5000], and then it populated everything
correctly. So my best guess is that the interceptor is initializing a list with a size of
256, but then it doesn’t expand the size correctly once the initial list has filled up.

This same code was working fine a year or so ago, but I’m not sure when it stopped working
or what version of struts we were on at the time.

Thanks for your help,
Allan Jackson
University of Kansas
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message