jsp中的小问题

xiaoxiao2021-02-28  62

jsp提示stuInfo cannot be resolved to a type 解决方法: 检查你的程序里面是不是把用到的类都导入到页面里面了, 在页面最上面使用 <%@page import="" %> 导入你的类就应该可以了。

2.java.lang.ArrayIndexOutOfBoundsException: 1

提示地址越界,经过反复排查,

<td>兴趣:</td>                    <td><input type="checkbox" value="music" name="hobby"                    <%String hobby[]=stu.getHobby();                    for(int i=0;i<course.length;i++){                    if(hobby[i].equals("music")){                    %>checked<% break;                            }

                    }

这里出现了问题把course.length改成hobby.length即可

转载请注明原文地址: https://www.6miu.com/read-2613390.html

最新回复(0)