资源简介

java语言开发的基于SSH框架的电商网站,采用html、css、struts-tag、js、jsp等技术进行开发,采用mysql数据库。利用maven作为项目管理工具。

资源截图

代码片段和文件信息

package com.action;

import com.enity.FlowerEnity;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.service.ICatalogService;
import com.service.IFlowerService;
import com.util.Pager;

import java.io.File;
import java.util.List;
import java.util.Map;

/**
 * Created by lenovo on 2017/1/24.
 */
public class flowerAction extends ActionSupport {

    private ICatalogService catalogService;
    private IFlowerService flowerService;
    
    private  int catalogid;  //struts框架  action获取获取jsp页面的参数,在action中建立同名的变量

    private  int currentPage=1;

    private FlowerEnity flower;
    private  String picture;
    private File upload;
    private  String uploadFileName;

    public int getCatalogid() {
        return catalogid;
    }

    public void setCatalogid(int catalogid) {
        this.catalogid = catalogid;
    }

    public IFlowerService getFlowerService() {
        return flowerService;
    }

    public void setFlowerService(IFlowerService flowerService) {
        this.flowerService = flowerService;
    }

    public ICatalogService getCatalogService() {
        return catalogService;
    }

    public void setCatalogService(ICatalogService catalogService) {
        this.catalogService = catalogService;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public FlowerEnity getFlower() {
        return flower;
    }

    public void setFlower(FlowerEnity flower) {
        this.flower = flower;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public File getUpload() {
        return upload;
    }

    public void setUpload(File upload) {
        this.upload = upload;
    }

    public String getUploadFileName() {
        return uploadFileName;
    }

    public void setUploadFileName(String uploadFileName) {
        this.uploadFileName = uploadFileName;
    }

    public String browseCatalog()throws Exception{

        List catalogs=catalogService.getAllCatalogs();
        Map request=(Map) ActionContext.getContext().get(“request“);
        request.put(“catalogs“catalogs);
        System.out.println(catalogs);

        return  SUCCESS;
    }

    public String browseNewFlower () throws  Exception{

        List newflowers=flowerService.getNewFlower();
        Map request=(Map) ActionContext.getContext().get(“request“);
        request.put(“newflowers“newflowers);

        return  SUCCESS;

    }
    public String browseFlowerPaging()throws Exception{
        int totalSize=flowerService.getTotalByCatalog(catalogid);
        System.out.println(totalSize);
        System.out.println(“55555555555555“);
        System.out.println(catalogid);
        P

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-03-30 23:36  flowerssh\
     目录           0  2018-04-17 16:03  flowerssh\.idea\
     目录           0  2018-01-10 00:08  flowerssh\.idea\artifacts\
     文件         293  2018-01-09 22:18  flowerssh\.idea\artifacts\flowerssh_war.xml
     文件        4344  2018-01-10 00:08  flowerssh\.idea\artifacts\flowerssh_war_exploded.xml
     文件         630  2018-01-09 22:32  flowerssh\.idea\compiler.xml
     目录           0  2018-01-09 22:20  flowerssh\.idea\dataSources\
     文件         813  2018-01-09 22:20  flowerssh\.idea\dataSources.local.xml
     文件         903  2018-01-09 22:20  flowerssh\.idea\dataSources.xml
     目录           0  2018-01-09 22:20  flowerssh\.idea\dataSources\7fc640e5-dd9e-4931-b3b2-36319b5a39d8\
     文件       15600  2018-01-09 22:20  flowerssh\.idea\dataSources\7fc640e5-dd9e-4931-b3b2-36319b5a39d8.xml
     文件         124  2018-01-09 22:20  flowerssh\.idea\dataSources\7fc640e5-dd9e-4931-b3b2-36319b5a39d8\storage.xml
     目录           0  2018-01-09 22:20  flowerssh\.idea\dataSources\7fc640e5-dd9e-4931-b3b2-36319b5a39d8\_src_\
     目录           0  2018-01-09 22:20  flowerssh\.idea\dataSources\7fc640e5-dd9e-4931-b3b2-36319b5a39d8\_staging_\
     文件         172  2018-01-09 22:15  flowerssh\.idea\encodings.xml
     目录           0  2018-01-10 00:08  flowerssh\.idea\libraries\
     文件         462  2018-01-09 23:51  flowerssh\.idea\libraries\Maven__antlr_antlr_2_7_7.xml
     文件         514  2018-01-09 22:32  flowerssh\.idea\libraries\Maven__aopalliance_aopalliance_1_0.xml
     文件         426  2018-01-09 22:32  flowerssh\.idea\libraries\Maven__asm_asm_3_3.xml
     文件         482  2018-01-09 22:32  flowerssh\.idea\libraries\Maven__asm_asm_commons_3_3.xml
     文件         461  2018-01-09 22:32  flowerssh\.idea\libraries\Maven__asm_asm_tree_3_3.xml
     文件         465  2018-01-09 22:32  flowerssh\.idea\libraries\Maven__c3p0_c3p0_0_9_1_2.xml
     文件         504  2018-01-09 22:32  flowerssh\.idea\libraries\Maven__cglib_cglib_nodep_2_1_3.xml
     文件         605  2018-01-09 22:32  flowerssh\.idea\libraries\Maven__commons_fileupload_commons_fileupload_1_2_2.xml
     文件         517  2018-01-09 22:32  flowerssh\.idea\libraries\Maven__commons_io_commons_io_2_0_1.xml
     文件         525  2018-01-09 22:32  flowerssh\.idea\libraries\Maven__commons_lang_commons_lang_2_5.xml
     文件         572  2018-01-09 22:32  flowerssh\.idea\libraries\Maven__commons_logging_commons_logging_1_1_1.xml
     文件         462  2018-01-09 23:51  flowerssh\.idea\libraries\Maven__dom4j_dom4j_1_6_1.xml
     文件         534  2018-01-09 22:32  flowerssh\.idea\libraries\Maven__javassist_javassist_3_11_0_GA.xml
     文件         578  2018-01-09 22:59  flowerssh\.idea\libraries\Maven__javax_servlet_javax_servlet_api_3_0_1.xml
     文件         510  2018-01-09 22:59  flowerssh\.idea\libraries\Maven__javax_servlet_jsp_jsp_api_2_1.xml
............此处省略305个文件信息

评论

共有 条评论