Getting error while executing request.getParameter(params) - Websphere

This is a discussion on Getting error while executing request.getParameter(params) - Websphere ; 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.parse Name(RequestUtils.java:235) at com.ibm.wsspi.webcontainer.util.RequestUtils.parse QueryString(RequestUtils.java:95) at com.ibm.ws.webcontainer.srt.SRTServletRequest.pars eQueryStringList(SRTServletRequest.java:1399) at com.ibm.ws.webcontainer.srt.SRTServletRequest.pars eParameters(SRTServletRequest.java:1356) at com.ibm.ws.webcontainer.srt.SRTServletRequest.getP arameter(SRTServletRequest.java:994) The URL ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Getting error while executing request.getParameter(params)

  1. 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.parse Name(RequestUtils.java:235)
    at com.ibm.wsspi.webcontainer.util.RequestUtils.parse QueryString(RequestUtils.java:95)
    at com.ibm.ws.webcontainer.srt.SRTServletRequest.pars eQueryStringList(SRTServletRequest.java:1399)
    at com.ibm.ws.webcontainer.srt.SRTServletRequest.pars eParameters(SRTServletRequest.java:1356)
    at com.ibm.ws.webcontainer.srt.SRTServletRequest.getP arameter(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!!!

  2. Re: Getting error while executing request.getParameter(params)

    Subrahmanyam A wrote:
    > 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.parse Name(RequestUtils.java:235)
    > at com.ibm.wsspi.webcontainer.util.RequestUtils.parse QueryString(RequestUtils.java:95)
    > at com.ibm.ws.webcontainer.srt.SRTServletRequest.pars eQueryStringList(SRTServletRequest.java:1399)
    > at com.ibm.ws.webcontainer.srt.SRTServletRequest.pars eParameters(SRTServletRequest.java:1356)
    > at com.ibm.ws.webcontainer.srt.SRTServletRequest.getP arameter(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!!!


    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();

  3. 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.

+ Reply to Thread