我在jsp中创建了一个方法。在该方法中,我使用了一些 html 标签,使用 out.println(); 方法,但它会让你无法解决。
这是我的代码:
<%! public int display(int start){
int limit;
limit = DEFAULT >= testList.size() ? testList.size() : DEFAULT;
System.out.println("size : "+ testList.size());
System.out.println("limit : "+ limit);
for(int count = start; count < limit; count++){
TestDetail detailContain = (TestDetail)testList.get(count);
tcName = detailContain.getTestName();
System.out.println("id : "+ tcName);
tcSource = detailContain.getSource();
tcDescription = detailContain.getDrescription();
idVal = detailContain.getID();
out.println("<tr>");
out.println("<td width = '5%'><input id='"+idVal+"' type = 'checkbox' name = 'Tests' value = '"+tcName+"'/></td>");
out.println("<td width = '20%'><a href = './"+tcSource+"'>"+tcName+"</a></td>");
out.println("<td width = '75%'>"+tcDescription+"</td>");
out.println("</tr>");
}
return limit;
}
%>
它给出了这个错误:
org.apache.jasper.JasperException:无法为 JSP 编译类:
jsp文件中的第108行出现错误:/Xyz/def/abc.jsp out cannot be resolve