jsp 调试过程的怪圈!原来是个小细节!

此文件为'LookAtCart.jsp'
每当连接到这个页面都是空白页面.
都到吃饭时间了,感觉进入了怪圈,不应该有这样的结果啊!里面不是注释的吗!!!
于是我重启了webserver,结果还是不行,实在无奈,还想着要不要问下别人,最后还是通过删点查点找到了那个
注释的代码是不能注释掉jsp执行的。于是我恍然大悟!记住了这个只是能注释掉html,却不是注释jsp/java的。

--------------------------------------------------------------

<%

Map<Integer, CartItem> cart = (Map<Integer, CartItem>) session.getAttribute("CART");

if (cart != null && cart.size() > 0) {

for (CartItem item : cart.values()) {

%>

<tr style="cursor: pointer; color: maroon" align="center">

<td><%=item.getBook().getId()%></td>

<td><%=item.getBook().getBookName()%></td>

<td><%=item.getBook().getAuthor()%></td>

<td><%=item.getBook().getPrice()%></td>

<td><%=(item.getBook().getPrice()) * (item.getNum())%></td>

<td onclick="modify(<%=item.getBook().getId()%>,this)"><%=item.getNum()%></td>

<td><%=item.getBook().getBookType()%></td>

<td style="color: green">

<a href="DelFromCartServlet?id=<%=item.getBook().getId()%>">删除</a>

</td>

<!-- <jsp:forward page="/LookAtCart.jsp"/> -->

</tr>

<%

}

}

%>

</table>

你可能感兴趣的:(jsp 调试过程的怪圈!原来是个小细节!)