下载此文档

毕设源代码-基于struts框架的网上书店系统.doc


文档分类:IT计算机 | 页数:约28页 举报非法文档有奖
1/28
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/28 下载此文档
文档列表 文档介绍
本科毕业设计(论文)
河北省海洋科学数据库管理系统数据导出平台设计
刘硕
燕山大学
2010年 6 月
本科毕业设计(论文)
基于struts框架的网上书店系统
学院(系):信息科学与工程学院
专业:06计算机科学与技术
学生姓名:刘硕
学号:060104010075
指导教师:陈子阳
答辩日期:2010年6月25日
图书查询模块
在地址栏中输入:http://localhost:8080/BookStore/,ActionServlet查询struts配置文件struts-<action-mappings>元素,, Bean进行处理,,查找配置文件struts-<global-forwards>元素,。具体代码如下:
配置文件struts-:<action path="/bookSearch" type="" name="bookSearchForm" scope="request" input="/" />
对应的form bean代码:<form-bean name="bookSearchForm"
type="">
<form-property name="mode" type="" />
<form-property name="bookCatId"type="" />
<form-property name="key" type="" />
<form-property name="field" type="" />
</form-bean>
对应的<global-forwards>元素:
<forward name="toBookMain" path="/" />
Bean的主要代码如下:
public final class BookSearchAction extends Action{
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
DynaActionForm bookSearchForm = (DynaActionForm) form;
Integer mode = null;//mode 搜索模式两种
Integer bookCatId = null;//书籍种类
String key = null; //按书籍或作者查询
String field = null;//模糊查询的关键字
if (bookSearchForm!=null){
mode = (Integer)("mode"); //搜索模式
bookCatId = (Integer)("bookCatId");
key = (String)("key");
field = (String)("field");}
SearchStatus schSta = new SearchStatus();int iMode=1; int iCatId=0;
if (mode==null){
iCatId = (db);//获得数据库中的第一个书籍种类 (iCatId); } //设置查询的书籍种类编号
else if (()==1){ //

毕设源代码-基于struts框架的网上书店系统 来自淘豆网www.taodocs.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数28
  • 收藏数0 收藏
  • 顶次数0
  • 上传人jia0277li
  • 文件大小489 KB
  • 时间2018-06-23