#Why ${appointments[#]} wont show up?

5 messages · Page 1 of 1 (latest)

elder sapphire
#

When I run the jsp and servlet on my local host, everything works fine but ${appointments[0]} until ${appointments[6]} won't show up any values. It was supposed to return the elements of a list from ArrayList named appointments, any idea what is the issue?

pure rootBOT
#

This post has been reserved for your question.

Hey @elder sapphire! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

leaden sundial
#

Dude, you named both your variables appointments

#

The entire point of a for-each is to not list all 6 of the items anyway. So choose: either you use a for-each and you don't write all indexes yourself (that's Java's job) or you write the 6 indexes yourself and you don't use a loop