Multidimensional arrays in Struts form?

Discussion in 'Java' started by geclinke, Jun 18, 2004.

  1. geclinke

    geclinke Guest

    Hi,

    I was wondering if anyone knew whether or not it's possible to use a
    multidimensional array in a Struts form.
    I have a JSP with a number of input elements;

    <input type="text" name="attribute[0][1]" value="xxxxx"/>
    ..........

    I've declared a two dimensional array in the relevant form and it's
    being accessed when the JSP is submitted.

    When I get the array from the form in an action the contents appear to
    be corrupted.
    Is there a fundamental problem with indexing elements in a
    multidimensional manner in JSP/Struts?

    Thanks,
    Giles
     
    geclinke, Jun 18, 2004
    #1
    1. Advertising

  2. geclinke

    jackie Guest

    As I remembered, you may use "map" instead of 2D array. I must state I read
    it from somewhere and I haven't give it a try.

    geclinke <> wrote in message
    news:...
    > Hi,
    >
    > I was wondering if anyone knew whether or not it's possible to use a
    > multidimensional array in a Struts form.
    > I have a JSP with a number of input elements;
    >
    > <input type="text" name="attribute[0][1]" value="xxxxx"/>
    > .........
    >
    > I've declared a two dimensional array in the relevant form and it's
    > being accessed when the JSP is submitted.
    >
    > When I get the array from the form in an action the contents appear to
    > be corrupted.
    > Is there a fundamental problem with indexing elements in a
    > multidimensional manner in JSP/Struts?
    >
    > Thanks,
    > Giles
     
    jackie, Jun 18, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. d[ - - ]b

    Multidimensional arrays? anything else?

    d[ - - ]b, May 18, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,684
    AlexS
    May 18, 2004
  2. Jay
    Replies:
    1
    Views:
    2,622
    BarryNL
    Jan 30, 2004
  3. Rene Eng
    Replies:
    0
    Views:
    5,229
    Rene Eng
    Jul 27, 2003
  4. Philipp
    Replies:
    21
    Views:
    1,184
    Philipp
    Jan 20, 2009
  5. Francesco
    Replies:
    2
    Views:
    1,167
    Francesco
    Nov 6, 2009
Loading...

Share This Page