1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

splitting parameter names as in PHP

Discussion in 'JSP' started by ororo, Jul 28, 2010.

  1. ororo

    ororo New Member

    Joined:
    Jul 28, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Dear all,
    I am new to JSP and I was used programming in PHP.
    In PHP, there is a useful feature: names of parameters are correctly splitted, so that

    <input name="myvar[1]" ...>
    <input name="myvar[2]" ...>

    generates correctly the array
    $_REQUEST['myvar']
    with entries [1] and [2]

    while in JSP I can only see two different parameters:

    request.getParameter('myvar[1]')
    request.getParameter('myvar[2]')

    So, my answer is, is there any way to access the array
    request.getParameter('myvar')
    ????

    Thank you.
     
  2. ororo

    ororo New Member

    Joined:
    Jul 28, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    EDIT: Sorry, "my question", and not "my answer" ;)
     

Share This Page