日期:2014-05-18 浏览次数:20953 次
<%@ page language="java" import="java.util.*" pageEncoding="GBK"
contentType="text/html; charset=gb2312" %>
<jsp:directive.page import="my.blog.BLL.RunSql" />
<jsp:directive.page import="my.blog.info.Info" />
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>Mpl博客程序 - Mpl小组</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="styles.css">
-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<font color="#333" id="title_div_style">CStrings博客系统</font>
<%
String sql = "select title,[type],createDate,author,click,comment from nr_table";
//list集合保存信息
List list = new ArrayList();
RunSql rs = new RunSql();
list = rs.RunSelect(sql);
//开始输出数据
for (int i = 0; i < list.size(); i++)
{
Info blogInfo = (Info) list.get(i);
%>
<table width="100%" border="0" cellspacing="2" id="wz_div_style">
<tr>
<td colspan="4" id="bt_div_style">
<%=blogInfo.title%>
</td>
</tr>
<tr>
<td id="lie_div_style">
类别:
<%=blogInfo.type%>
</td>
<td>
发布时间:
<%=blogInfo.createDate%>
</td>
<td>
评论:
<%=blogInfo.comment%>
</td>
<td>
浏览:
<%=blogInfo.click%>
</td>
</tr>
</table>
<%
}
%>
</body>
</html>