Getting error while executing request.getParameter(params)
Hi all,
I am getting the following error while trying to retrieve valule from the HttpServletRequest obj in my Struts Action class.
java.lang.IllegalArgumentException
at com.ibm.wsspi.webcontainer.util.RequestUtils.parseName(RequestUtils.java:235)
at com.ibm.wsspi.webcontainer.util.RequestUtils.parseQueryString(RequestUtils.java:95)
at com.ibm.ws.webcontainer.srt.SRTServletRequest.parseQueryStringList(SRTServletRequest.java:1399)
at com.ibm.ws.webcontainer.srt.SRTServletRequest.parseParameters(SRTServletRequest.java:1356)
at com.ibm.ws.webcontainer.srt.SRTServletRequest.getParameter(SRTServletRequest.java:994)
The URL which i am submitting using javascript at html file is something as mentioned below:
document.all.id1.value = 11;
document.all.id2.value = 22;
document.all.id3.value = 33;
document.all.form1.action = "/callpage.do?params=testing";
document.all.for1.submit();
Method type for form submit is : post
In the Struts action class i am writing as :
String sMethodName = request.getParameter('params');
Here i am getting the above said error.
If anyone is having any idea about solution to this error, then please share.
I am using WAS ND 6.1
Thanks in advance!!!
Re: Getting error while executing request.getParameter(params)
Subrahmanyam A wrote:[color=blue]
> Hi all,
>
> I am getting the following error while trying to retrieve valule from the HttpServletRequest obj in my Struts Action class.
>
> java.lang.IllegalArgumentException
> at com.ibm.wsspi.webcontainer.util.RequestUtils.parseName(RequestUtils.java:235)
> at com.ibm.wsspi.webcontainer.util.RequestUtils.parseQueryString(RequestUtils.java:95)
> at com.ibm.ws.webcontainer.srt.SRTServletRequest.parseQueryStringList(SRTServletRequest.java:1399)
> at com.ibm.ws.webcontainer.srt.SRTServletRequest.parseParameters(SRTServletRequest.java:1356)
> at com.ibm.ws.webcontainer.srt.SRTServletRequest.getParameter(SRTServletRequest.java:994)
>
> The URL which i am submitting using javascript at html file is something as mentioned below:
>
> document.all.id1.value = 11;
> document.all.id2.value = 22;
> document.all.id3.value = 33;
> document.all.form1.action = "/callpage.do?params=testing";
> document.all.for1.submit();
>
> Method type for form submit is : post
>
> In the Struts action class i am writing as :
>
> String sMethodName = request.getParameter('params');
>
> Here i am getting the above said error.
>
> If anyone is having any idea about solution to this error, then please share.
> I am using WAS ND 6.1
>
> Thanks in advance!!![/color]
Can you change the javascript? something like build a hidden field named
'params' in form1, then
document.all.id1.value = 11;
document.all.id2.value = 22;
document.all.id3.value = 33;
document.all.form1.params.value='testing';
document.all.form1.action = "/callpage.do";
document.all.form1.submit();
Re: Getting error while executing request.getParameter(params)
Your query string in the request object has special character due to which it is not able to get the parameter from request object.