if i'm not mistaken, your array has 20 items in it - 0 through 19 - therefore
length = 20, but when you do an i = 20, the array looks for data(20), which ain't
so.
it can only get to data(19) - which is item no.20.
jf
Apollo Mcowiti wrote:
> I do not understand this: In my jsp i have a loop. as long as i write it in
> this way, where my array data contains more than 20 items;
>
> for(int i=0; i<data.length;i++){
> blah blah..
>
> Everything goes on fine, but the moment i change to
> for(int i=0; i<20;i++){
> blah blah
>
> I get internal server error problem.
> Why is this so? What am i not doing right?
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets