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

📄 responselist.jsp

📁 论坛的通用版本,是基于eclipse+struts来设计的,他提供了游客,用户和管理员三类,功能有发表话题,发表回复,注册登陆,用户管理,等等..任何想加如到自己系统的朋友都可以使用!
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" language="java"%>
<%@ include file="/common/taglibs.jsp"%>

<html:html>
<head>
	<title>
		帖子列表
	</title>
</head>

<link href="images/myStyleClass.css" rel="stylesheet" type="text/css">
<body>
	<%@ include file="/common/header.jsp"%>

	<html:errors />
	
	<%@ page import="j2eebbs.*"%>
	<%@ page import="java.util.*"%>
	<%
		session.setAttribute(Constants.TALK_TYPE_KEY, "response");
		String username = (String) session.getAttribute("username");
		Vector responseVector = (Vector) session
			.getAttribute(Constants.RESPONSE_LIST_KEY);
		Response resp = null;
		if (responseVector != null) {
			String content;
			String grade;
	%>
	<table width="97%" border="1" align="center">
		<tr>
			<td colspan="2">
				<table width="97%" border="0" align="center">
					<tr>
						<td>
							欢迎你访问论坛:<%=username%>
						</td>
						<td align="right">
							<A href="<%=request.getContextPath()%>/backtoindex.do">
								首页
							</A>&nbsp;
							<A href="logoff.do">
								注销登录
							</A>&nbsp;
							<A href="newtopic.do">
								回复主题
							</A>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<%
			for (int i = 0; i < responseVector.size(); i++) {
				resp = (Response) responseVector.get(i);
				content = resp.getContent();
				if (content == null)
					content = "";
				grade = resp.getGrade();
				if (grade == null)
					grade = "";
		%>
		<tr>
			<td colspan="2">
				<table width="100%" border="0" bordercolor="#FFFFCC">
					<tr bgcolor="#3366CC">
						<td width="22%">
							作者:<%=resp.getAuthor()%>
						</td>
						<td width="78%">
							标题:<%=resp.getTitle()%>
					  </td>
					</tr>
					<tr bgcolor="#CCCCCC">
						<td>
							等级:<%=grade%>
							<BR>
							发表时间:<%=resp.getSubmittime()%>
					  </td>
						<td>
							<%=content%>&nbsp;
					  </td>
				  </tr>
			  </table>
			</td>
		</tr>
		<%}
			%>
		<%} 
		%>
</table>
	<%@ include file="/common/footer.jsp"%>
</body>
</html:html>

⌨️ 快捷键说明

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