jsp只在首次加载时调用action实现代码
内容摘要
复制代码 代码如下: <% List<Class> list=(List)request.getAttribute("classlist"); if(list==null){ response.sendRedirect("class.do?method=doShow"); } %> class.do
文章正文
复制代码 代码如下:
<%
List<Class> list=(List)request.getAttribute("classlist");
if(list==null){
response.sendRedirect("class.do?method=doShow");
}
%>
class.do是action名称。
代码注释