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