Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

2D Array in a JSP

Options
  • 07-05-2006 2:55am
    #1
    Closed Accounts Posts: 155 ✭✭


    I have a bean that is returning a 2d array to a jsp but I can get the jsp to display the array. I'm setting/getting the array with the code below.

    String[][] myvar = mybean.getSomething();


    Any ideas/tips? Probably very simple but its late and I have been deprived of much needed sleep!

    Thanks


Comments

  • Closed Accounts Posts: 261 ✭✭bishopLEN




  • Closed Accounts Posts: 155 ✭✭h0stn0tf0und


    Thanks for the reply.

    The problem is that I dont know the size of the 2d array being passed back. Its a query from a DB. I had looked at the link you posted but still couldnt get it to go. :(

    Casting the array dosent seem to work either. The length of the array is 0.
    String[][] myvar = (String[][]) mybean.getSomething();


  • Closed Accounts Posts: 155 ✭✭h0stn0tf0und


    Note to self: get sleep before asking questions.

    Got it sorted, casting WAS my problem.

    Thanks bishop


Advertisement