JF is exactly right. One more thing I would point to Apollo though: he's
not looking for the exception that's correlated with the "internal server
error." "Internal server error" is the most generic of server error
messages. All it means is something, anything went wrong on the server. A
smart JSP programmer would use an errorPage and would also look in the JSP
container's logs for more data. No doubt you were getting an
ArrayIndexOutOfBoundsException, but you never saw it because you didn't know
where to look. Next time try those techniques so you can find out what the
internal server error way.
Scott Stirling
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of sun_king
Sent: Sunday, May 21, 2000 3:40 PM
To: [EMAIL PROTECTED]
Subject: Re: Strngest thing
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