【正文】
st request, HttpServletResponse response) throws ServletException, IOException { (text/html。)。/script)。 String result = 文章添加失??!。 ArticleTypeForm ArticleTypeForm = new ArticleTypeForm()。/script)。 PrintWriter out = ()。=39。 } } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response)。如圖45。如圖49。發(fā)表文章:進入發(fā)表文章頁面,輸入標題、文章內(nèi)容,點擊“發(fā)表文章”彈出發(fā)表成功提示,進入日志頁面可以看到已發(fā)表的文章,單擊閱讀全文可以正常進入全文瀏覽頁面。以上測試系統(tǒng)均可以正常通過,完全可以達到預期的功能要求。提高了系統(tǒng)的可維護性以及運行效率。 主要實現(xiàn)功能(1)實現(xiàn)了用戶的注冊、登錄、修改和刪除。Java技術(shù)相對于其它網(wǎng)站技術(shù)有著相當大的優(yōu)勢,如較高的運行效率、安全性和擴展性等。謹此對莊老師表示最衷心的感謝!同時,我也要感謝學校提供給我這樣一次難得的實踐機會,使我能夠在走出校門之前得到鍛煉,通過此次畢業(yè)設計,必將對我的將來產(chǎn)生生積極的影響。它讓不同年齡和不同背景的人們能夠互動起來,在以后的日常生活中,它會作為人們生活的一部分,人們的情緒、智慧、意見和思想都將在這里表達。但同時也應看到,由于時間倉促系統(tǒng)的實現(xiàn)還不是盡善盡美,有待于進一步的改進和完善。 完成情況該系統(tǒng)具有JAVA技術(shù)所具有的許多優(yōu)良特性。在未成功登錄的情況下在IE地址欄直接輸入后臺頁面地址,返回錯誤頁面,顯示“您還未登錄或登錄超時,請單擊這里重新登錄!”的錯誤信息。登錄:用正確的用戶名密碼登錄,可以成功登錄。如圖48。圖43 用戶登錄界面 Blog首頁考慮到日志是博客的主體部分,設計Blog首頁默認顯示的是用戶的日志列表,右側(cè)是好友列表和最新公告,如圖44。(1)。添加文章類別成功,請重新查詢!39。 } } // 后臺添加文章類別 public void addArticleType(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { (text/html。=39。charset=GBK)。 (((phTime)))。)。 if ((刪除, articleForm)) { (script language=javascriptalert(39。(1)。修改文章成功,請重新查詢!39。 PrintWriter out = ()。/script)。 restoreDao = new RestoreDao()。 } else { (script language=javascriptalert(39。 (((reTitle)))。 } if (method == 7) { (request, response)。 public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { int method = ((method))。import 。import 。 return null。 return true。 (true)。public class JDBConnection {private final String url =jdbc:microsoft:sqlserver://localhost:1433。 } public void setPhTime(String phTime) { = phTime。 private Integer number=1。 } (增加, articleForm)。 try { while (()) { articleForm = new ArticleForm()。 ((6))。 order by id desc。 if ((sql)) { flag = true。,content=39。 + () + 39。 String sql = null。import 。表46 相片表列名數(shù)據(jù)類型長度Not Nullidint4photoAddressvarchar50√photoDescriptvarchar50√photoTimevarchar50√7)文章回復表,存放用戶的回復信息。經(jīng)過詳細的分析確定了系統(tǒng)的相關(guān)實體、實體的屬性以及各實體之間的關(guān)系,如圖41所示。設計數(shù)據(jù)庫系統(tǒng)時應該首先充分了解用戶各個方面的要求,包括現(xiàn)有的以及將來可能增加的需求。 一個視圖(View)用來組織模型的內(nèi)容。用戶可以認為JavaBean提供了一種隨時隨地的復制和粘貼的功能,而不用關(guān)心任何改變,因此,在Blog設計中使用JavaBean來封裝業(yè)務邏輯可以使程序邏輯更加清晰,提高開發(fā)效率和質(zhì)量。從這一點來看,非常類似Microsoft ASP、PHP等技術(shù)。J2EE包含Web、EJB以及Application Client,3部分。Java是一種簡單的、面向?qū)ο蟮摹⒎植际降?、解釋?zhí)行的、健壯的安全的、結(jié)構(gòu)的中立的、可移植的、性能很優(yōu)異的多線程的動態(tài)的語言【1】。由于本Blog系統(tǒng)對硬件要求偏低,使用低端服務器或普通臺式計算機即可滿足基本需求。為提高數(shù)據(jù)庫安全性,為數(shù)據(jù)庫設定密碼,并禁用來賓用戶。但由于本Blog系統(tǒng)基于J2EE技術(shù),具有良好的可移植性,如果需要可以在不修改代碼的前提下由Windows平臺移植到UNIX或Linux平臺。已注冊的用戶即為會員,也即自己博客的博主。3)照片的上傳和管理:博主可以進入相片管理頁面,上傳照片、編輯照片描述、刪除照片。 系統(tǒng)分析系統(tǒng)分析是管理開發(fā)的起點,也是整個管理系統(tǒng)實現(xiàn)過程中的關(guān)鍵環(huán)節(jié),因為如果系統(tǒng)環(huán)節(jié)做得不好,會影響到系統(tǒng)實現(xiàn)的后繼環(huán)節(jié),甚至造成開發(fā)失敗。3)控制層(Controller)控制層主要用來轉(zhuǎn)發(fā)從視圖層傳來的數(shù)據(jù)和請求到相對應的模型層,因此,實現(xiàn)它最好的方式莫過于使用Servlet了。(5)結(jié)論與致謝第2章 系統(tǒng)的總體設計框架 設計思想和設計原則 設計思想本系統(tǒng)分為前臺和后臺兩個部分,前臺包括日志、公告、好友、相冊、博主信息五個模塊,是呈現(xiàn)給會員和游客的頁面。Blog給大家看,大家的Blog也給你看。寫B(tài)log,可以反映出人的思考過程,而不僅僅是思考結(jié)果。Blog作為一種新表達的方式,它傳播的不僅是情緒,包括大量的智慧、意見和思想。Blog用它的創(chuàng)新給網(wǎng)絡帶來了新的生命力,讓不同年齡層和不同背景的人們能夠互動起來。它是應時代的需求而興起的,也是應時代需求不斷進步的。Weblog,其實是Web和Log的組合詞。并且,目前基于J2EE的開源框架也已經(jīng)非常成熟。JAVA作為目前最為流行的技術(shù)之一,其企業(yè)版本(J2EE)在設計與實現(xiàn)Web應用方面非常適合。關(guān)鍵詞 :Blog;J2EE;Servlet;Java Bean;JSPAbstractWith the popularity of the network and the improvement of living conditions, people more and more dependent on the Internet, from work to the Internet to do more. Personal blog for them to build a network show and munication platform, where people can write log, mood, message, upload photos, post news, make friends, share their bits of life . Development of a blog system, through the activities of the rich and growing blog feature, so blog and being a part of life. JAVA technology as one of the most popular current, version of its enterprise (J2EE) Web applications in the design and implementation is very suitable. Moreover, the current open source J2EEbased framework has also been very mature. Can be an excellent framework for the use of existing system design and construction. Designed and implemented using J2EE technology to Blog is the purpose of this article lies.This article will design and implement a J2EEbased Blog system. The system uses the MVC (Model View Controller) design pattern, said layer to achieve with JSP, Servlet take control layer of the affairs, business logic encapsulated in the Java Bean in and through the DAO layer to access the database. While the use of these technologies, Blog by analyzing the characteristics of the final pletion of system architecture design and implementation. The system is mainly to plete the user login, registration and user log and announcements on the publication and management, upload photos, personal information,