[ https://issues.apache.org/jira/browse/WW-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17155868#comment-17155868 ]
James Chaplin commented on WW-5077: ----------------------------------- Hello [~ghuber]. Thanks for reporting the issue that you are seeing with the log output. You are seeing the new log entries (with _devMode_ true) when trying the Struts 2.5.23 test build, correct ? The new log warnings you are seeing (with _devMode_ only) were intended to advise more clearly when a given parameter is being rejected by the _ParametersInterceptor_ (due to matching an exclusion pattern and/or not matching any accepted pattern). Maybe there needs to be an additional configuration flag that would allow these new warnings with _devMode_ on to be suppressed (or set back to _++debug_ level as they used to be) ? If, after reviewing the log output, you determine those warnings are not relevant information for your application, one thing you could try would be to adjust the Log4j2 (or whichever logger you are using) logging level for the _ParametersInterceptor_ to _error_. That should eliminate those _warn_ outputs when _devMode_ is true. Try adding something similar to the following to the <Loggers> section of log4j2.xml for your application: {code:java} <Logger name="com.opensymphony.xwork2.interceptor.ParametersInterceptor" level="error" additivity="false"> <AppenderRef ref="STDOUT"/> <!-- Add additional AppenderRef entries for log appenders, as needed --> </Logger>{code} and see if that helps to suppress the warnings filling your logs with _devMode_ on. Note: If you determine that your application actually _needs_ the rejected parameters to be accepted, you _could_ try a custom acceptance pattern for the _ParametersInterceptor_ (via "params.acceptParamNames"). +Use caution in changing the default parameter acceptance patterns, as it can impact the safety of the application+. From your logs above, that would mean a change to also accept parameters with patterns like "(\:\w+\.\w+)|(\:\w+\!\w+)". Please let us know if the above information (especially the logging level setting) helps with the issue you reported (or not). > Unable to set long pathname variables > ------------------------------------- > > Key: WW-5077 > URL: https://issues.apache.org/jira/browse/WW-5077 > Project: Struts 2 > Issue Type: Bug > Components: Core > Affects Versions: 2.3.24 > Reporter: Stephan > Priority: Major > Fix For: 2.5.24, 2.6 > > Attachments: Struts2Sample.zip, Struts2Sample2.zip > > Time Spent: 2h > Remaining Estimate: 0h > > > I implemented a simple struts2+tiles (Struts 2 core version: 2.3.24.1) as a > test case to verify an issue that have. > In detail, i have the following Struts form: > {code:java} > <s:form action="save"> > <s:hidden name="metadataTest.name" value="Level-1_new" /> > <s:hidden name="metadataTest.metadataList[0].name" > value="Level-2_new" /> > <s:hidden > name="metadataTest.metadataList[0].metadataList[0].name" value="Level-3_new" > /> > <s:hidden > name="metadataTest.metadataList[0].metadataList[0].metadataList[0].name" > value="Level-4_new" /> > <s:hidden > name="metadataTest.metadataList[0].metadataList[0].metadataList[0].metadataList[0].name" > value="Level-5_new" /> > <s:hidden > name="metadataTest.metadataList[0].metadataList[0].metadataList[0].metadataList[0].metadataList[0].name" > value="Level-6_new" /> > <s:hidden > name="metadataTest.metadataList[0].metadataList[0].metadataList[0].metadataList[0].metadataList[0].metadataList[0].name" > value="Level-7_new" /> > <s:submit/> > </s:form> > {code} > The metadataTest class: > {code:java} > public class Metadata implements Serializable { > /** The Constant serialVersionUID. */ > private static final long serialVersionUID = 5902230367443812176L; > private String name; > private ArrayList<Metadata> metadataList; > public Metadata() { > } > public String getName() { > return name; > } > public void setName(String name) { > this.name = name; > } > public ArrayList<Metadata> getMetadataList() { > return metadataList; > } > public void setMetadataList(ArrayList<Metadata> metadataList) { > this.metadataList = metadataList; > } > } > {code} > My issue here is following. When i submit this form, all values up to this > level, are set correctly > {code:java} > <s:hidden > name="metadataTest.metadataList[0].metadataList[0].metadataList[0].metadataList[0].metadataList[0].name" > value="Level-6_new" /> > {code} > For some reason the below hidden element is never set, instead, the > medataList at level 6 is null, while the name set by the hidden field above, > is set correctly. > {code:java} > <s:hidden > name="metadataTest.metadataList[0].metadataList[0].metadataList[0].metadataList[0].metadataList[0].metadataList[0].name" > value="Level-7_new" /> > {code} > Is there any kind of limitation by struts concerning the depth in a list > hierarchie or maybe the length of path to set a value ? I could not find > something related. > *Note 1*: It surely has to do something with the length of the parameters. > Once i changed the variable names to longer ones, i was able to set values > only up to Level 3. > *Note 2*: Downgrading to Struts 2.1.6 resolves the issue. Also latest version > 2.5.22 seems to be afffected from the exact same issue. Is there any > workaround ? > -- This message was sent by Atlassian Jira (v8.3.4#803005)