基于ssh的个人信息博客网站的设计与实现--毕业设计内容摘要:
分类导航条主要通过访问 Action 来实现超链接。 登录进入博客后首页如 图 45 所示 : 图 45 个人主页 个人资料修改页面 如 图 46 所示 : 图 46 会员资料修改 登录后,用户可以查看日志及日志评论、删除日志、写日志、发表新日志时可以选择或添加日志类型,选择是否对外公开。 页面设计效果如图 4 4 49 所示 : 11 图 47 日志管理 图 48 发表日志 关键程序代码如下: public ActionForward doWriteEssay(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException { User loginedUser = (User) ().getAttribute( loginedUser)。 Essay essay = new Essay()。 ((title))。 ((contents))。 EssayType essayType = ((request .getParameter(typeId)))。 (essayType)。 (((selfish)))。 12 ((0))。 (new Date())。 (loginedUser)。 (essay)。 (?operate=toMyEssay)。 return null。 } 图 49 日志 页面 相册功能模块的实现 登录后,用户可以查看图片、删除图片、上传图片、上传图片时可以选择或创建新相册,选择是否对外公开。 页面设计效果如图 4 411 所示: 图 410 相册管理 13 图 411 上传图片 关键程序代码如下: public ActionForward doAddAlbum(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException { (GBK)。 PrintWriter printWriter = ()。 User loginedUser = (User) ().getAttribute( loginedUser)。 UploadForm myForm = (UploadForm) form。 FormFile myFile = ()。 long typeId = ()。 int selfish = ()。 AlbumType albumType = (typeId)。 if (myFile != null) { String type = ()。 if ((image/pjpeg) || (image/gif) || (image/jpg) || (image/png) || (image/bmp)) { try { if (().length 10 * 1024 * 1024) { (文件大小: 14 + ().length + byte)。 (文件大于 10M)。 printWriter .println(scriptalert(39。 上传文件大于 10M,上传失败39。 )。 (1)。 /script)。 return null。 } String dir = (true).getServletContext() .getRealPath(/upload)。 File file1 = new File(dir + / + ())。 File file2 = new File(file1 + / + ())。 if (!()) { ()。 } if (!()) { ()。 } FileOutputStream fos = new FileOutputStream(file2 + / + ())。 (())。 ()。 ()。 } catch (Exception e) { ()。 printWriter .println(scriptalert(39。 上 传 文 件 错 误 , 上 传 失 败39。 )。 (1)。 /script)。 return null。 } Album album = new Album()。 15 (albumType)。 (())。 (selfish)。 (loginedUser)。 (album)。 (?operate=toMyAlbum)。 return null。 } else { printWriter .println(scriptalert(39。 你上传文件类型不合法 ,上传失败39。 )。 (1)。 /script)。 return null。 } } return null。 } 文件功能模块的实现 登录后,用 户可以查看文件详细信息、删除文件、上传文件、下载文件、上传文件时可以添加文件描述。 页面设计效果如图 41 41 414 所示: 图 412 文件管理 16 图 413 文件上传 关键程序代码如下: public ActionForward doAddFile(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException { (GBK)。 PrintWriter printWriter = ()。 User loginedUser = (User) ().getAttribute( loginedUser)。 UploadForm myForm = (UploadForm) form。 FormFile myFile = ()。 String describle = ()。 FileType usefulTyle = null。 if (myFile != null) { String type = ()。 if ((audio/mpeg)) { usefulTyle = (FileType) (name, mp3).get(0)。 } if ((application/msword)) { usefulTyle = (FileType) (name, doc).get(0)。 } 17 if ((text/plain)) { usefulTyle = (FileType) (name, txt).get(0)。 } if ((application/octetstream)) { usefulTyle = (FileType) (name, rar).get(0)。 } if ((application/pdf)) { usefulTyle = (FileType) (name, pdf).get(0)。 } if (usefulTyle != null) { try { String dir = (true).getServletContext() .getRealPath(/upload)。 File file1 = new File(dir + / + ())。 File file2 = new File(file1 + / + ())。 if (!()) { ()。 } if (!()) { ()。 } FileOutputStream fos = new FileOutputStream(file2 + / + ())。 (())。 ()。 ()。 } catch (Exception e) { 18 ()。 printWriter .println(scriptalert(39。 上 传 文 件 错 误 , 上 传 失 败39。 )。 (1)。 /script)。 return null。 } file = new ()。 (())。 (usefulTyle)。 (describle)。 ((0))。 (new Date())。 (loginedUser)。 (file)。 (?operate=toMyFiles)。 return null。 } else { printWriter .println(scriptalert(39。 你上传文件类型不合法 ,上传失败39。 )。 (1)。 /script)。 return null。 } } return null。 } 19 图 414 文件下载 关键程序代码如下: public ActionForward download(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException { String id = (id)。 downFile = () (Long .parseLong(id))。 String path =。 PrintWriter out = null。 (GBK)。 User loginedUser = (User) ().getAttribute( loginedUser)。 User hostUser = null。 if (loginedUser == null) { hostUser = (User) ().getAttribute(hostUser)。 String enteredId = (String) ().getAttribute( entere。基于ssh的个人信息博客网站的设计与实现--毕业设计
相关推荐
1、光世昌老师高中物理精品资源免费下载地址 启用前2013 年普通高等学校招生全国统一考试(新课标卷)理科综合能力测试注意事项:1. 本试卷分第卷(选择题)和第卷(非选择题)两部分。 答卷前,考生务必将自己的姓名、准考证号填写在答题卡上。 2. 回答第卷时,选出每小题答案后,用 2B 铅笔把答题卡上对应题目的答案标号框涂黑,如需改动,用橡皮擦干净后,再选涂其他答案标号框。 写在本试卷上无效。 3
1、光世昌老师高中物理精品资源免费下载地址 (天津卷)理科综合 生物部分倍【答案】在线粒体中进行,过程 生的能量全部储存在 生的(O)中的氧全部来自 中均能产生H,二者还原的物质不同【答案】D图 a、b 分别为农村和城市生态系统的生物量(生命物质总量)金字塔示意图。 案】 , 体综合征的诊断【答案】是一种引起皮肤感染的“超级细菌” ,对青霉素等多种抗生素有抗性。 为研究人母乳中新发现的蛋白质 H
序、键盘扫描程序、启动程序、关闭程序、建功能程序、密码设置程序、 EEPROM 读写程序和延时程序等组成。 图 41 组成原理 电源输入电路 三端集成稳压器 LM7805 和 LM7905 是作为固定输出电压的典型应用。 正常复位电路 振荡电路 键盘电路 开锁电路 STC89C52 单片机 显示电路 报警电路 13 工 作时,输入、输出电压差为 23V。 电容 C 为输入稳定电容
活动图、协作图等。 分析所建议的系统可能带来的影响及其优越性,最后评价系统的技术可行性,即在限定的条件下,利用现有的技术,现有数量和质量的开发人员,和可以利用的资源,在规定的期限内,开发是否能够完成。 2. 2. 5 限制条件的影响 虽然系统的开发存在几个不利因素,此系统的各项功能都是开发人员分析比较常用的比较熟悉的, 并且所有开发人员都有很强的分析设计与代码编写能力
所有电气参数的模拟量采集,包括电压、电流、有功功率、无功功率、有功电度和无功电度等参数。 根据遥信、遥控、遥测规模的大小 ,可以选用单独一个基本模块或者一个基本模块和若干个扩展模块进行组合,达到所需的遥测、遥信、遥控点数。 图 CPU224型 S7200 PLC构成的数据采集与控制单元结构配置示意图,实际配置可根据变电站规模的大小、现场一次设备布置的具体情况确定。 一条总线上最多可挂接
1、光世昌老师高中物理精品资源免费下载地址 :H 1 C 12 O 16 3 4 第卷(选择题 共 120 分)本卷共 20 小题,每小题 6 分,共 120 分。 在每小题列出的四个选项中,选出符合题目要求的一项。 理后的核糖体仍可催化氨基酸的脱水缩合反应,由此可以推测核糖体中能催化该反应的物质是 A蛋白酶 合酶 某植物花冠切成大小和形状相同的细条,分为a、b、c、d、e 和 f