Jump to content

i need help


Guest friend
 Share

Recommended Posts

Guest friend

i want to extract the database contents into select box of jsp page.i got the contents in the arraylist properly and but when i try to extract those contents into <select > box then it gives me the err saying ArrayIndexOutOfbounds.........pls help me out.

Link to comment
Share on other sites

This is not a java server pages forum.Javascript has no relation to java...If you get an ArrayIndexOutOfBoundsException, you should check the logic of your iteration through the elements of the ArrayList. That exception is only thrown when you do what its name suggests - attempt to access an index greater than the highest accessible index (or less common, something less than the lowest index). The index of an ArrayList is 0-based, so the largest index you can access is actually one less than the size of the ArrayList, and the smallest index is 0 - assuming the Arraylist has a size greater than 0.For example, if the size of the ArrayList is 5, then the highest index you can access is 4.If you need more help, you should probably go find a forum for jsp.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...