修挖机的猿
2015-04-20 09:55
四月 20, 2015 9:49:18 上午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [jsp] in context with path [/test1] threw exception [An exception occurred processing JSP page /requstTest.jsp at line 33
30: <%
31: String[] Aihao= request.getParameterValues("aihao");
32: for(int i=0;i<=Aihao.length;i++){
33: if(Aihao[i]==null){
34: out.println("浣犱斧鐨勬病杈撳叆鐖卞ソ銆傘?傛垜浠?庝箞鐜╋紵");
35: }
36: out.println(Aihao[i]);}
Stacktrace:] with root cause
for循环中i<=Aihao.length;改为i<Aihao.length,数组的下标最大也就是数组长度-1
JAVA遇见HTML——JSP篇
248278 学习 · 3071 问题
相似问题