jsp 新闻详情页面

<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.news.Newlists" %>
<%@ page import="com.model.News" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>

<body>
<jsp:include page="top.jsp" flush="true" />

<div class="main">
<div class="newtext">
<% String nid= request.getParameter("id");
Newlists db=new Newlists();
News model= new News();
model=db.newdetail(Integer.parseInt(nid));

%>
<h1><%=model.getTitle()%></h1>
<!--<p><%=model.getId()%></p>-->
<div class="new_content"><%=model.getContent()%></div>
</div>
</div>
</body>
</html>

posted @ 2015-05-28 17:44  luoyiming  阅读(592)  评论(0)    收藏  举报