·ÖÒ³À¸ jsp ´úÂë
************************************************************************
·ÖÒ³µÄ´úÂ룺
--------------CSSÑùʽ--------------
<style type="text/css">
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
body table tr td table tr {
background-color: #FFF;
}
.pages {
padding-bottom: 2px;
padding-left: 0px;
padding-right: 0px;
padding-top: 2px;
float:right;
}
.pages a {
border-bottom: 1px solid;
border-left: 1px solid;
padding-bottom: 0px;
line-height: 20px;
padding-left: 6px;
padding-right: 6px;
float: left;
height: 20px;
overflow: hidden;
border-top: 1px solid;
margin-right: 2px;
border-right: 1px solid;
padding-top: 0px;
border-bottom-color: #e6e7e1;
background-color: #fff;
border-top-color: #e6e7e1;
color: #09c;
border-right-color: #e6e7e1;
border-left-color: #e6e7e1
}
.pages a:hover {
border-bottom-color: #09c;
border-top-color: #09c;
border-right-color: #09c;
border-left-color: #09c
}
.pages a:visited{
text-decoration:none;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
.topindex{
padding-top:10px;
padding-bottom:10px;
text-align:center;
}
.topindex span{
margin-left:10px;
margin-right:10px;
}
.topindex span a:link{
color:#810081;
}
</style>
--------------¼òµ¥·ÖÒ³--------------
<div class="pages">
<a href="showposttable.jsp?currentPage=1" mce_href="showposttable.jsp?currentPage=1">Ê×Ò³</a>
<%if(currentPage>1){%>
<a href="showposttable.jsp?currentPage=<%=currentPage-1%>" >ÉÏÒ»Ò³</a>
<%}%>
<a href="showposttable.jsp?currentPage=<%=currentPage%>" style="
Ïà¹ØÎĵµ£º
ÎÒÃǶ¼ÖªµÀÔÚjspÖÐincludeÓÐÁ½ÖÖÐÎʽ,·Ö±ðÊÇ
<%@ include file=" "%>
<jsp:include page=" " flush="true"/>
ǰÕßÊÇÖ¸ÁîÔªËØ¡¢ºóÕßÊÇÐÐÎªÔªËØ.
ͨ³£µ±Ó¦ÓóÌÐòÖÐËùÓеÄÒ³ÃæµÄijЩ²¿·Ö(ÀýÈç±êÌâ¡¢Ò³½ÅºÍµ¼º½À¸)¶¼ÏàͬµÄʱºò,Î ......
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.Servl ......
1¡¢jspÒ³ÃæÂÒÂ룺
ÔÚjspÒ³Ãæ¿ªÊ¼Ìí¼Ó<%pageEncoding="uft-8"%>
2¡¢servletÊä³öÂÒÂ룺
ÔÚÊä³öÄÚÈÝ֮ǰ£¬ÏÈÖ´ÐÐresponse.setContentType
("text/html;charset=utf-8")
3¡¢ÔÚformÀïÓÃpost·½Ê½Ìá½»²ÎÊý£º
1£©½ÓÊÕʱ¼Órequest.setCharacterEncoding("utf-8")
2£©Ê¹ÓùýÂËÆ÷£¬ÔÚ½ÓÊÕ²ÎÊý֮ǰ£¬É趨´«µÝµÄ²ÎÊýÄ ......
<%@page import="java.util.*"%>
<%@page import="java.io.*"%>
<%@page import="java.net.*"%>
<%
String filename = "";
if (request.getParameter("file") != null) {
filename = request.getParameter("file");
}
response.setContentType("application/msword");
response.setHeader("C ......