1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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