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

📄 view.jsp

📁 struts hibernate spring实现新闻发布系统含说明文档
💻 JSP
字号:
<%@ page language="java" import="java.util.*,com.ata.wx.java01b.dao.*"
	pageEncoding="gbk"%>
<%@ 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"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>查看新闻</title>
		<link href="styles.css" rel="stylesheet" type="text/css" />
	</head>
	<style type="text/css">
/* CSS Document */
body {
	font: normal 11px auto "Trebuchet MS", Verdana, Arial, Helvetica,
		sans-serif;
	color: #4f6b72;
	background: #E6EAE9;
}

a {
	color: #c75f3e;
}

#mytable {
	width: 700px;
	padding: 0;
	margin: 0;
	text-align: center;
}

caption {
	padding: 0 0 5px 0;
	width: 700px;
	font: italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
	text-align: right;
}

th {
	font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
	color: #4f6b72;
	border-right: 1px solid #C1DAD7;
	border-bottom: 1px solid #C1DAD7;
	border-top: 1px solid #C1DAD7;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-align: left;
	padding: 6px 6px 6px 12px;
	background: #CAE8EA url(images/bg_header.jpg) no-repeat;
}

th.nobg {
	border-top: 0;
	border-left: 0;
	border-right: 1px solid #C1DAD7;
	background: none;
}

td {
	border-right: 1px solid #C1DAD7;
	border-bottom: 1px solid #C1DAD7;
	background: #fff;
	font-size: 11px;
	padding: 6px 6px 6px 12px;
	color: #4f6b72;
}

td.alt {
	background: #F5FAFA;
	color: #797268;
}

th.spec {
	border-left: 1px solid #C1DAD7;
	border-top: 0;
	background: #fff url(images/bullet1.gif) no-repeat;
	font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}

th.specalt {
	border-left: 1px solid #C1DAD7;
	border-top: 0;
	background: #f5fafa url(images/bullet2.gif) no-repeat;
	font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
	color: #797268;
}

/*---------for IE 5.x bug*/
html>body td {
	font-size: 11px;
}
</style>
	<body>
			<table id="mytable" cellspacing="0">
				<caption>
				</caption>
				<logic:present name="news">
					<logic:iterate id="newss" name="news"
						offset="<%=request.getParameter("newsindex")%>" length="1">
						<tr>
							<th scope="col" colspan="2" align="center">
								查看新闻
							</th>
						</tr>

						<tr>
							<th scope="row" class="specalt">
								新闻标题
							</th>
							<td class="alt" align="left">
								<%=((News) newss).getTitle()%>"
							</td>
						</tr>

						<tr>
							<th scope="row" class="specalt" valign="top">
								新闻内容
							</th>
							<td class="alt" align="left" >
								<html:textarea property="content" cols="80" rows="20"
									value="<%=((News) newss).getContent()%>" readonly="true">
								</html:textarea>
							</td>
						</tr>

						<tr>
							<th scope="row" class="specalt" >
								作者
							</th>
							<td class="alt" align="left">
								<%=((News) newss).getUser().getUsername()%>
							</td>
						</tr>

						<tr>
							<th scope="row" class="specalt">
								添加时间
							</th>
							<td class="alt" align="left">
								<bean:write name="newss" property="time" />
							</td>
						</tr>
					</logic:iterate>
				</logic:present>
			</table>
	</body>
</html>

⌨️ 快捷键说明

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