Questions about JSP page loading times error 500

Source: Internet
Author: User

First of all, the problem occurred, the individual made a small system, the finished product run several times, no problem, the results of the last test, found the landing page error:

account password input is correct, after the background login, supposedly should enter the successful landing JSP page, but the result is:

About

java.lang.indexoutofboundsexception:index:0, size:0

Error, mostly because the list of the value of the problem, after the test found that my login after the page has a snippet code is this:

Comment out the <s:iterator> tag or delete the Begin End property, and the page will jump to success!!!

here is the method of using the iteration label S:iterator in Strust2

Iteration Label : An object used to traverse a collection (java.util.Collection) or enumeration value (Java.util.Iterator) type, theValue property represents a collection or enumeration object, The Status property represents the object that is currently looping, and the properties of the object can be referenced inside the loop body

<s:iterator value= "userlist" status= "User" >

Name: <s:property value= "#user. UserName"/>

Age: <s:property value= "#user. Ages"/>

</s:iterator>

Where begin and end are used to control the number of iterations in the array, starting subscript and ending subscript.

And my error, because the value of the data to iterate is not 0~3, that is, the whole list of the iteration of the data is not enough 4, so an error ...

Questions about JSP page loading times error 500

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.