freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于jsp的網(wǎng)上購物系統(tǒng)的設計與實現(xiàn)_免費下載-閱讀頁

2024-12-21 22:19本頁面
  

【正文】 _context_classthread/property property name=update/property mapping class=/ mapping class=/ mapping class=/ mapping class=/ mapping class=/ mapping class=/ mapping class=/ /sessionfactory /hibernateconfiguration 這是 Hibernate的配置文件,在該文件中 property name=/property首先加載了連接池的一個配置,就是加載了數(shù)據(jù)庫的連接信息, property name=show_sqltrue/propertyproperty name=format_sqltrue/property表示控制臺打印 SQL語句,并格式化 SQL語句。 mapping class=/ mapping class=/ mapping class=/ 吉林工商學院本科畢業(yè)論文 15 mapping class=/ mapping class=/ mapping class=/ mapping class=/ struts 配置文件 struts constant name= value=spring / constant name= value=UTF8 / package name=index namespace=/ extends=strutsdefault action name=index method=index class=indexAction result name=success/result /action action name=product method=product class=indexAction result name=success/result /action action name=cartadd method=cartadd class=indexAction result name=success/result result name=fail/result result name=fail2/result /action 這是 struts 的配置文件的部分內(nèi)容,該文件的作用主要起到來自 JSP 的請求的跳轉(zhuǎn)分配的作用,把的請求分配到對應的 action 里面去,同時定義返回的的 JSP 頁面。 bean id=userAction class= scope=prototype property name=usref bean=userService //property property name=csref bean=cartService //property /bean bean id=indexAction class= scope=prototype property name=csref bean=categoryService //property property name=psref bean=productService //property property name=cartServiceref bean=cartService //property property name=pingjiaServiceref bean=pingjiaService //property property name=addressServiceref bean=addressService //property property name=usref bean=userService //property /bean bean id=manageAction class= scope=prototype property name=userServiceref bean=userService //property property name=productServiceref bean=productService //property property name=cartServiceref bean=cartService //property property name=csref bean=categoryService //property property name=pingjiaServiceref bean=pingjiaService //property /bean 系統(tǒng)各功能模塊的實現(xiàn) 網(wǎng)站主頁面如圖 。 (topcatelist, ())。 int currentpage = 1。 if((pagenum)!=null){ currentpage= ((pagenum))。amp。 String searchname = ((searchname), utf8)。 (hotprolist,((吉林工商學院本科畢業(yè)論文 18 (currentpage1)*pagesize,6,keyword)))。 } else if((qujian1id)!=null){ String v = (v)。 String qujian2id = ((qujian2id), utf8)。 if(2.equals(v)){ where = where price2=+qujian1id+ and price2= +qujian2id + and productlock=0。 (hotprolist,(((currentpage1)*pagesize,6,where)))。qujian1id=+qujian1id+amp。 }else if(cid==null){ int total = ()。//熱門商品列表 (pagerinfo, (total, pagesize, currentpage, .,共有 +total+件商品 ))。 (hotprolist,(((currentpage1)*pagesize,6,(cid))))。 } (xiaoliangprolist,(吉林工商學院本科畢業(yè)論文 19 gProduct(0, 15)))。 } 本段代碼是主頁面代碼,通過 種商品的信息,同時提供搜索菜單等功能,最后通過 return success。 用戶登陸模塊是防止非法用戶登陸的第一道防線,通過它可以保護后臺數(shù)據(jù)庫的安全性,當用戶要進行定購時,首先要進入的就是身份驗證界面,只有在密碼正確的情況下才能進行以后的購物,如果輸入的密碼不正確,則不能進行定購。 如果用戶還沒有進行注冊,用戶提交信息之后,系統(tǒng)開始判斷用戶的注冊信息是否有效,首先是用戶名是否為空,用戶輸入的兩次密碼是否一致,然后依次往后判斷用戶所填寫的各項信息是否符合要求,直到所有信息均正確無誤,系統(tǒng)將該用戶注冊信息寫入用戶表并提示用戶注冊成功,用戶登陸后,就可以進行有效的購物了。 圖 吉林工商學院本科畢業(yè)論文 20 代碼如下 。 HttpServletResponse response = ()。 (((username), utf8))。 (((truename), utf8))。 (((phone), utf8))。 (((qq), utf8))。 (((daan), utf8))。 int result = (user)。 ().write(注冊新用戶成功!您的用戶名 +()+,請妥善保管! )。 ().write(該用戶名已經(jīng)存在,請重新注冊! )。 圖 代碼如下: public String login() throws IOException { HttpServletRequest request = ()。 if(u==null) { HttpServletResponse response = ()。 response .getWriter() .print( script language=javascriptalert(39。)。index39。 return null。 (flag,1)。 return success。 吉林工商學院本科畢業(yè)論文 22 圖 代碼如下: 修改用戶信息頁面 public String userinfoedit() throws IOException{ HttpServletRequest request = ()。 String basePath = ()+://+()+:+()+path+/。 (topcatelist, ())。//銷量排行商品列表 User user = ( where id= +(id))。 return success。 User user = ( where id= +(id))。 String = ()。 吉林工商學院本科畢業(yè)論文 23 String truename = (truename)。 (address)。 (phone)。 (qq)。 HttpServletResponse response = ()。 response .getWriter() .print( script language=javascriptalert(39。)。userinfo39。 } 當用戶登陸成功以后,如果找到了希望定購的商品,在點擊商品以后,系統(tǒng)會彈出一個新的頁面,用戶需要選擇是否將商品加入購物車,我選擇了戴爾筆記本電腦作為例子,演示的頁面效果如圖 。 代碼如下: //添加到購物車 public String cartadd(){ HttpServletRequest request = ()。 if((flag)!=nullamp。(Integer)(flag)==1){ if((((pid)))){ return success。 } }else{ return fail。用戶可以對所選商品進行數(shù)量的變更和刪除,同時系統(tǒng)也將購物車表中相關(guān)信息進行同步更改。頁面效果如圖 所示 。 Product p = (((pid)))。 if(num()) { HttpServletResponse response = ()。 () .print(script language=javascriptalert(39。)。cart39。 return null。 return success。 (((pid)))。 } //結(jié)算操作 public String address() throws IOException{ ListCartItem cartItems = ()。 HttpSession session = ()。 (addresslist, (0, 9999, where =+()))。 if(()()) { HttpServletResponse response = ()。 () .print(script language=javascriptalert(39。)。cart39。 return null。 } return success。生成訂單后用戶可以對詳細送貨地址進行添加或刪除的操作。生成訂單的界面如圖 所示 。 HttpSession session = ()。amp。 ListCartItem cartItems = ()。 ((int)().getId())。 (())。 (oi)。 (()+())。 (product)。 ((User)(user))。 (new Date())。 ((username))。 (orderItems)。 ()。 (gbk)。訂單生成成功,訂單已轉(zhuǎn)入物流配送!請密切關(guān)注訂單狀態(tài) 39。 =39。/script)。 } Else { HttpServletResponse response = ()。 response .getWriter() .print( script language=javascriptalert(39。)。index39。 return null。 String dizhi = (dizhi)。 (dizhi)。 User user = (User)(user)。 (bean)。 (gbk)。錄入成功 39。 =39。/script)。 吉林工商學院本科畢業(yè)論文 29 Address bean = ( where id= +(id))。 HttpServletResponse response = ()。 response .getWriter() .print( script language=javascriptalert(39。)。addresslist
點擊復制文檔內(nèi)容
教學課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1