91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 687KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-03
  • 語(yǔ)言: Java
  • 標(biāo)簽: javaee??myeclipse??留言板??

資源簡(jiǎn)介

簡(jiǎn)單的留言板程序,可以學(xué)習(xí),也可以當(dāng)作一次實(shí)驗(yàn)報(bào)告。用戶名密碼都是root

資源截圖

代碼片段和文件信息

/*?????*/?package?dao;
/*?????*/?import?java.sql.PreparedStatement;
/*?????*/?import?java.sql.ResultSet;
/*?????*/?import?java.util.ArrayList;
import?java.util.List;
import?dbc.DatabaseConnection;
import?model.Note;
/*?????*/?
/*?????*/?public?class?NoteDAO{
/*?????*/???public?void?insert(Note?note)throws?Exception{
/*??11?*/?????String?sql?=?“INSERT?INTO?note1(titleauthorcontent)?VALUES(???)“;
/*??12?*/?????PreparedStatement?pstmt?=?null;
/*??13?*/?????DatabaseConnection?dbc?=?null;
/*??14?*/?????dbc?=?new?DatabaseConnection();
/*?????*/?????try
/*?????*/?????{
/*??17?*/???????pstmt?=?dbc.getConnection().prepareStatement(sql);
/*??18?*/???????pstmt.setString(1?note.gettitle());
/*??19?*/???????pstmt.setString(2?note.getAuthor());
/*??20?*/???????pstmt.setString(3?note.getContent());
/*??21?*/???????pstmt.executeUpdate();
/*??22?*/???????pstmt.close();
/*?????*/?????}
/*?????*/?????catch?(Exception?e)
/*?????*/?????{
/*??27?*/???????throw?new?Exception(“操作中出現(xiàn)錯(cuò)誤!!!“);
/*?????*/?????}
/*?????*/?????finally
/*?????*/?????{
/*??31?*/???????dbc.close();
/*?????*/?????}
/*?????*/???}
/*?????*/?
/*?????*/???public?void?update(Note?note)?throws?Exception
/*?????*/???{
/*??37?*/?????String?sql?=?“UPDATE?note1?SET?title=?author=?content=??WHERE?id=?“;
/*??38?*/?????PreparedStatement?pstmt?=?null;
/*??39?*/?????DatabaseConnection?dbc?=?null;
/*??40?*/?????dbc?=?new?DatabaseConnection();
/*?????*/?????try
/*?????*/?????{
/*??43?*/???????pstmt?=?dbc.getConnection().prepareStatement(sql);
/*??44?*/???????pstmt.setString(1?note.gettitle());
/*??45?*/???????pstmt.setString(2?note.getAuthor());
/*??46?*/???????pstmt.setString(3?note.getContent());
/*??47?*/???????pstmt.setInt(4?note.getId());
/*??48?*/???????pstmt.executeUpdate();
/*??49?*/???????pstmt.close();
/*?????*/?????}
/*?????*/?????catch?(Exception?e){
/*??53?*/???????throw?new?Exception(“操作中出現(xiàn)錯(cuò)誤!!!“);
/*?????*/?????}finally{
/*??57?*/???????dbc.close();
/*?????*/?????}
/*?????*/???}
/*?????*/?
/*?????*/???public?void?delete(int?id)?throws?Exception
/*?????*/???{
/*??63?*/?????String?sql?=?“DELETE?FROM?note1?WHERE?id=?“;
/*??64?*/?????PreparedStatement?pstmt?=?null;
/*??65?*/?????DatabaseConnection?dbc?=?new?DatabaseConnection();
/*?????*/?????try
/*?????*/?????{
/*??69?*/???????pstmt?=?dbc.getConnection().prepareStatement(sql);
/*??70?*/???????pstmt.setInt(1?id);
/*??71?*/???????pstmt.executeUpdate();
/*??72?*/???????pstmt.close();
/*?????*/?????}
/*?????*/?????catch?(Exception?e){
/*??76?*/???????throw?new?Exception(“操作中出現(xiàn)錯(cuò)誤!!!“);
/*?????*/?????}
/*?????*/?????finally{
/*??80?*/???????dbc.close();
/*?????*/?????}
/*?????*/???}
/*?????*/?
/*?????*/???public?Note?queryById(int?id)?throws?Exception
/*?????*/???{
/*??86?*/?????Note?note?=?null;
/*??87?*/?????String?sql?=?“SELECT?idtitleauthorcontent?FROM?note1?WHERE?id=?“;
/*??88?*/?????PreparedStatement?pstmt?=?null;
/*??89?*/?????DatabaseConnection?dbc?=?nul

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-11-26?15:54??Note\
?????文件?????????455??2017-10-18?18:31??Note\.classpath
?????目錄???????????0??2018-01-08?15:24??Note\.myeclipse\
?????文件?????????285??2018-01-07?15:44??Note\.mymetadata
?????文件????????1410??2017-10-18?18:37??Note\.project
?????目錄???????????0??2017-11-26?15:54??Note\.settings\
?????文件?????????500??2017-10-18?18:30??Note\.settings\.jsdtscope
?????文件??????????49??2017-10-18?18:30??Note\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2017-10-18?18:30??Note\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????目錄???????????0??2017-11-26?15:54??Note\WebRoot\
?????目錄???????????0??2017-11-26?15:54??Note\WebRoot\meta-INF\
?????文件??????????36??2017-10-18?18:30??Note\WebRoot\meta-INF\MANIFEST.MF
?????目錄???????????0??2017-11-26?15:54??Note\WebRoot\WEB-INF\
?????目錄???????????0??2018-01-07?22:49??Note\WebRoot\WEB-INF\classes\
?????目錄???????????0??2018-01-07?22:49??Note\WebRoot\WEB-INF\classes\dao\
?????文件????????4826??2018-01-07?22:49??Note\WebRoot\WEB-INF\classes\dao\NoteDAO.class
?????文件????????1682??2018-01-07?22:49??Note\WebRoot\WEB-INF\classes\dao\PersonDAO.class
?????目錄???????????0??2018-01-07?22:49??Note\WebRoot\WEB-INF\classes\dbc\
?????文件????????1107??2018-01-07?22:49??Note\WebRoot\WEB-INF\classes\dbc\DatabaseConnection.class
?????目錄???????????0??2018-01-07?22:49??Note\WebRoot\WEB-INF\classes\model\
?????文件????????1074??2018-01-07?22:49??Note\WebRoot\WEB-INF\classes\model\Note.class
?????文件?????????875??2018-01-07?22:49??Note\WebRoot\WEB-INF\classes\model\Person.class
?????目錄???????????0??2018-01-07?22:49??Note\WebRoot\WEB-INF\classes\servlet\
?????文件????????2040??2018-01-07?22:49??Note\WebRoot\WEB-INF\classes\servlet\LoginServlet.class
?????文件????????3467??2018-01-07?22:49??Note\WebRoot\WEB-INF\classes\servlet\NoteServlet.class
?????目錄???????????0??2017-11-26?15:54??Note\WebRoot\WEB-INF\lib\
?????文件??????703265??2017-10-18?18:31??Note\WebRoot\WEB-INF\lib\mysql-connector-java-5.1.6-bin.jar
?????文件?????????756??2017-10-18?18:32??Note\WebRoot\WEB-INF\web.xml
?????文件????????1022??2017-10-18?18:31??Note\WebRoot\delete_do.jsp
?????文件?????????748??2017-10-18?18:31??Note\WebRoot\errors.jsp
?????文件????????1233??2018-01-07?23:22??Note\WebRoot\index.jsp
............此處省略20個(gè)文件信息

評(píng)論

共有 條評(píng)論

相關(guān)資源