Note that there are some explanatory texts on larger screens.

plurals
  1. POPost parameters are becoming null (at random)
    primarykey
    data
    text
    <p>My web application is developed with Struts2 and it was working fine till recently. All of a sudden one of the modules has started malfunctioning. </p> <p>The malfunctioning module is 'Update Student details' page. This page has a lot of fields like 'schoolName', 'degreeName', etc . </p> <pre><code>School 1: &lt;input name="schoolName"&gt; School 2: &lt;input name="schoolName"&gt; ..... School n: &lt;input name="schoolName"&gt; </code></pre> <p>As mentioned earlier, the page was working perfectly fine till recently. Now, one/many of the values of 'schoolName', 'degreeName', etc are being received as "" (EMPTY STRING) on the server-side. </p> <p>For debugging, I used firebug and remote-debugging in eclipse. I find that the post-parameters are correct on the client-side. For instance, during one of the submissions the post-parameters were as below (i noted them from firebug). </p> <pre><code>Content-Type: multipart/form-data; boundary=---------------------------2921238217421 Content-Length: 48893 &lt;OTHER_PARAMETERS&gt; &lt;!--Truncated for clarity --&gt; -----------------------------2921238217421 Content-Disposition: form-data; name="schoolName" ABC Institute -----------------------------2921238217421 Content-Disposition: form-data; name="schoolName" Test School -----------------------------2921238217421 Content-Disposition: form-data; name="schoolName" XYZ -----------------------------2921238217421 Content-Disposition: form-data; name="schoolName" Texas Institute -----------------------------2921238217421 Content-Disposition: form-data; name="schoolName" XXXX School -----------------------------2921238217421-- </code></pre> <p>But on the server-side, the request params were as below: </p> <pre><code>schoolName=[ABC Institute, Test School, XYZ, , XXXX School], </code></pre> <p>"Texas Institute" was received as "" (EMPTY STRING) in this particular case. This is not happening consistently. The parameters that become NULL (or EMPTY STRING) seem random to me - during one instance, parameter schoolName[3] became null as illustrated above, parameter schoolName[2] became null during yet another submission, etc. At times, none of the parameters are nullified. </p> <p>The following is the list of the interceptors in the action definition. </p> <pre><code>List of interceptors: ---------------------- FileUploadInterceptor org.apache.struts2.interceptor.FileUploadInterceptor ServletConfigInterceptor org.apache.struts2.interceptor.ServletConfigInterceptor StaticParametersInterceptor com.opensymphony.xwork2.interceptor.StaticParametersInterceptor ParametersInterceptor com.opensymphony.xwork2.interceptor.ParametersInterceptor MyCustomInterceptor com.xxxx.yyyy.interceptors.GetLoggedOnUserInterceptor </code></pre> <p>This issue appears rather weird to me and I have not been able to zero-in on the exact cause of the issue. Any help in this regard would be highly appreciated. Thanks in advance. </p> <p>Thanks, Raghuram</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload