⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 space.jsp

📁 JSP_博客网站系统,功能完整。学习JSP的好资料。开发时采用Eclipse+MyEclipse结合Tomcat部署。
💻 JSP
字号:

<%@ page language="java" import="java.util.*,huc.blog.bean.*" pageEncoding="UTF-8"%>
<%@ page import="huc.blog.util.ParamUtils" %>
<%@ page import="huc.blog.util.DateUtils" %>
<%@ page import="java.util.Calendar" %>
<%String path = request.getContextPath();
			String basePath = request.getScheme() + "://"
					+ request.getServerName() + ":" + request.getServerPort()
					+ path + "/";
%>

<%
	User user = (User)ParamUtils.getObjectAttribute(request, "user", null);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>博客-主页</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">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		
		<link rel="stylesheet" type="text/css" href="css/styles.css">

	</head>

	<body>
		<jsp:include page="common/header.jsp">
			<jsp:param name="userid" value="<%=user.getId()%>"/>
			<jsp:param name="spaceName" value="<%=user.getSpaceName()%>"/>
		</jsp:include>
		
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E4EDFB">
  <tr>
				<td height="307" valign="top">
					<table width="130" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td>
								<table width="100%" height="57">
									<tr>
										<td class="titletdsize"><b>档案文件</b></td>
									</tr>
									<tr>
										<td><img src="<%=user.getIcon()%>" width="140" height="160"/></td>
									</tr>
									<tr>
										<td style="font-size: 16px;">
											<b>昵称:</b>&nbsp;&nbsp;&nbsp;<%=user.getNickName()%><br/>
											<b>城市:</b>&nbsp;&nbsp;&nbsp;<%=user.getCity()%><br/>
											<b>点击:</b>&nbsp;&nbsp;&nbsp;<%=user.getSpaceHit()%><br/>								
										</td>
									</tr>
									<tr>
										<td align="right" style="font-size: 14px;"><a href="servlet/ShowProfile?userid=<%=user.getId()%>">查看详细信息</a></td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td height="10">&nbsp;</td>
						</tr>
						<tr>
							<td>
								<table width="100%">
									<tr>
										<td class="titletdsize"><b>存档</b></td>
									</tr>
									<tr>
										<td class="slfont"">
										<%
											String startDate = DateUtils.formatTo(user.getRegDate());
											String currentDate = DateUtils.format(Calendar.getInstance().getTime());
											StringBuffer str = new StringBuffer();
											str.append("<UL>\n\r");
											while(DateUtils.compareTime(startDate,currentDate)){
												str.append("<LI><a href=\"servlet/ShowBlog?userid=");
												str.append(user.getId());
												str.append("&blogdate=");
												str.append(currentDate);
												str.append("\">");
												str.append(currentDate.substring(0,4));
												str.append("年");
												str.append(currentDate.substring(4,6));
												str.append("月");
												str.append("</a></LI>\n\r");
												//将当前时间提前一月
												currentDate = DateUtils.roleTime(currentDate, false);
											}
											str.append("</UL>\n\r");
											out.println(str.toString());
										%>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td height="150">
								<jsp:include page="common/spacelist.jsp">
									<jsp:param name="usersType" value="newusers"/>
									<jsp:param name="listName" value="最新更新"/>
								</jsp:include>
							</td>
						</tr>
						<tr>
							<td height="150">
								<jsp:include page="common/spacelist.jsp">
									<jsp:param name="usersType" value="hotusers"/>
									<jsp:param name="listName" value="最受欢迎"/>
								</jsp:include>
							</td>
						</tr>
					</table>
				</td>
				<td valign="top">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td width="500" valign="top">
								<%@ include file="./partblog.inc" %>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		<jsp:include page="common/footer.jsp" />
	</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -