日期:2014-05-18  浏览次数:20680 次

各位大侠帮帮我~~关于用JSP设计一个简单BOLG
我的毕业设计的题目设计一个简单BLOG系统~现在打算用JSP和   TOMCAT和MYSQL做
服务器环境已经配置好了,但上手就发现不知道该怎么做,各位能给我一些好的建议或一些资料吗,小弟跪谢啊

------解决方案--------------------
这是Oracle的,你可以参考一下
<%@ page contentType= "text/html;charset=gb2312 "%>
<%@ page import= "java.sql.* "%>
<%@ page import= "java.lang.* "%>
<%@ page import= "java.util.* "%>
<%@ page import= "java.io.* "%>
<%@ page import= "oracle.sql.CLOB "%>
<%@ page import= "oracle.jdbc.driver.OracleResultSet "%>
<%@ include file= "checkbbsuser1.jsp "%>
<%@ include file= "./include/GBToUnicode.jsp "%>
<%@ include file= "./include/function.jsp "%>
<jsp:useBean id= "db " scope= "page " class= "dbpool.telecom.Dbweb_pool " />
<%@ page import= "java.text.* "%>
<%@ include file= "../inc/ftbbstohtml.jsp "%>
<%
db.setOut(out);
db.connect(application);
%>

<html>
<head>
<title> 阅读帖子 </title>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<link href= "10ss.css " rel= "stylesheet " type= "text/css ">
<style type= "text/css ">
<!--
.style3 {font-size: 12px; color: #000000; }
.STYLE4 {font-size: 12px}
body {
background-color: #ACB9D1;
}
a:link {
color: #990000;
}
a:visited {
color: #990000;
}
-->
</style>
</head>
<%
String id=request.getParameter( "id ");
String article_memo= " ";
String sql= "select article_memo from article where article_id= "+id;
rs=db.doSearch(sql);
while(rs.next())
{
oracle.sql.CLOB clob = (oracle.sql.CLOB)rs.getClob(1);
if (clob != null){
Reader is = clob.getCharacterStream();
BufferedReader br = new BufferedReader(is);
String s = br.readLine();
while (s != null) {
article_memo += s + " <br> ";
s = br.readLine();
}}

%>
<body text= "#000000 ">
<table width= "507 " height= "5% " align= "center " cellpadding= "0 " cellspacing= "0 ">
<tr>
<td width= "505 " height= "61 "> <table cellpadding= "0 " cellspacing= "1 " border= "0 " align=center height= "238 ">
<tr>
<td width= "39 " height= "215 " align=center > <span class= "STYLE4 "> 内容: </span> </td>
<td width= "463 " align=center >
<textarea name= "content " cols= "60. " rows= "15 " style= "background-color:#ACB9D1 "> <%=GBToUnicode(article_memo)%> </textarea> </td>
<tr>
<td height= "20 " colspan= "2 " align=center > <span class= "STYLE4 "> <a href= "# " onClick= "close1() "> 关闭 </a> </span> &nbsp;&nbsp; <span class= "STYLE4 "> <a href= "banzhu_recyle.jsp?id= <%=id%> "> 放入回收站 </a> </span> </td>
</table> </td>
</tr>
</table>
</body>
<