日期:2014-05-18  浏览次数:20816 次

请问我页面不能响应试怎么回事
我写的新闻页面,在打开时共要读取两次数据,分别用于生成菜单和新闻列表,但我发现当我页面大开后,响应十分慢,甚至无法响应,也就是在我启动服务的一开始的几分钟内,响应及时,过了几分钟后就变慢了,甚至无法响应,我检查并没报错,我用来测试的数据十分少只有16条。
请问是怎么回事。
以下是我的代码:
-------------------------jsp-----------------------------------
<%@ page language="java" pageEncoding="utf-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
  <head>
  <html:base />
   
  <title>news</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">  
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="css/body.css">
<script type="text/javascript" src="http://w3css.com/down/js/pngfix.js"></script>
<script type="text/javascript">
function add(){
document.getElementById("id").value = <%=request.getParameter("id") %>
var comment = document.getElementById("comment");
if(comment.value == null ||comment.value ==""){
alert("不能发表空评论!");
return false;
}

}
</script>
  </head>
  
  <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
  <table cellpadding="0" cellspacing="0" border="0">
  <tr>
  <td>
  <table cellpadding="0" cellspacing="0" border="0">
  <tr>
  <td>
  <jsp:include page="head2.jsp" flush="true"></jsp:include>
  </td>
  </tr>
  </table>
  </td>
  </tr>
 
  <tr>
  <td>
<table cellpadding="0" cellspacing="0" border="0">
  <tr>
  <td>&nbsp;&nbsp;</td>
  <td>
  <img border="0" src="news/direction.png" width="248" height="30">
  </td>
  </tr>
  </table>
  </td>
  </tr>
 
  <tr><td>&nbsp;</td></tr>
 
  <tr>
  <td>
  <table cellpadding="0" cellspacing="0" border="0">
  <tr>
  <td>&nbsp;&nbsp;</td>
 
  <td valign="top">
  <table border="0" cellpadding="0" cellspacing=&qu