• 大小: 249KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-17
  • 语言: 其他
  • 标签: struts2  json  echarts  

资源简介

struts2框架json传递后台数据到echarts,把数据从后台传递到前端。这里我用的是json的方式传递,框架是struts2

资源截图

代码片段和文件信息

package action;

import java.util.ArrayList;   
import java.util.HashMap;   
import java.util.List;   
import java.util.Map;   

 
import com.opensymphony.xwork2.ActionSupport;   
public class TestJsonaction extends ActionSupport {
 private static final long serialVersionUID = 3518833679938898354L;   
     

    private Map userdata1;
    public Map getUserdata1() {   
        return userdata1;   
    }   
    public void setUserdata1(Map userdata1) {   
        this.userdata1 = userdata1;   
    }   
    private Map userdata2;
    
    public Map getUserdata2() {   
        return userdata2;   
    }   
    public void setUserdata2(Map userdata2) {   
        this.userdata2 = userdata2;   
    }   
    private Map userdata3;
    
    public Map getUserdata3() {   
        return userdata3;   
    }   
    public void setUserdata3(Map userdata3) {   
        this.userdata3 = userdata3;   
    }   
    
    public String gainUserInfo(){   
     userdata1 =new HashMap();
     double[] c1={16251.9311307.2824515.7611237.5514359.8822226.710568.831258219195.6949110.2732318.8515300.6517560.1811702.8245361.8526931.0319632.2619669.5653210.2811720.872522.6610011.3721026.685701.848893.12605.8312512.35020.371670.442102.216610.05};
     double[] c2={14113.589224.4620394.269200.861167218457.278667.5810368.617165.9841425.4827722.3112359.3314737.129451.2639169.9223092.3615967.6116037.9646013.069569.852064.57925.5817185.484602.167224.18507.4610123.484120.751350.431689.655437.47};
     double[] c3={12153.037521.8517235.487358.319740.2515212.497278.75858715046.4534457.322990.3510062.8212236.537655.1833896.6519480.4612961.113059.6939482.567759.161654.216530.0114151.283912.686169.75441.368169.83387.561081.271353.314277.05};
     double[] c4={111156719.0116011.977315.48496.213668.586426.18314.3714069.8730981.9821462.698851.6610823.016971.0530933.2818018.5311328.921155536796.7170211503.065793.6612601.233561.565692.12394.857314.583166.821018.621203.924183.21};
     double[] c5={9846.815252.7613607.326024.456423.1811164.35284.69710412494.0126018.4818753.737360.929248.535800.2525776.9115012.469333.49439.631777.015823.411254.174676.1310562.392884.114772.52341.435757.292703.98797.35919.113523.16};
     double[] c6={8117.784462.7411467.64878.614944.259304.524275.126211.810572.2421742.0515718.476112.57583.854820.5321900.1912362.797617.477688.6726587.764746.161065.673907.238690.242338.983988.14290.764743.612277.35648.5725.93045.26};
     double[] c7={6969.523905.6410012.114230.533905.038047.263620.275513.79247.6618598.6913417.685350.1765

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1382  2018-02-13 17:11  demo\.classpath

     文件       1329  2018-02-13 17:11  demo\.project

     文件        522  2018-02-13 17:11  demo\.settings\.jsdtscope

     文件         95  2018-02-13 17:11  demo\.settings\com.genuitec.eclipse.core.prefs

     文件         92  2018-02-13 17:11  demo\.settings\org.eclipse.core.resources.prefs

     文件        364  2018-02-13 17:11  demo\.settings\org.eclipse.jdt.core.prefs

     文件        471  2018-02-13 17:11  demo\.settings\org.eclipse.wst.common.component

     文件        464  2018-02-13 17:11  demo\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2018-02-13 17:11  demo\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2018-02-13 17:11  demo\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       7343  2018-02-13 17:11  demo\src\action\TestJsonaction.java

     文件        789  2018-02-13 17:11  demo\src\struts.xml

     文件      12679  2018-02-13 17:11  demo\WebRoot\index.jsp

     文件       3072  2018-02-13 17:11  demo\WebRoot\js\json.js

     文件     701506  2018-02-13 17:11  demo\WebRoot\lib\echarts.min.js

     文件      86659  2018-02-13 17:11  demo\WebRoot\lib\jquery-3.2.1.min.js

     文件         39  2018-02-13 17:11  demo\WebRoot\meta-INF\MANIFEST.MF

     文件      12873  2018-02-13 17:11  demo\WebRoot\WEB-INF\classes\action\TestJsonaction.class

     文件        789  2018-02-13 17:11  demo\WebRoot\WEB-INF\classes\struts.xml

     文件        941  2018-02-13 17:11  demo\WebRoot\WEB-INF\web.xml

     目录          0  2018-02-13 17:11  demo\WebRoot\WEB-INF\classes\action

     目录          0  2018-02-13 17:11  demo\WebRoot\WEB-INF\classes

     目录          0  2018-02-13 17:11  demo\WebRoot\WEB-INF\lib

     目录          0  2018-02-13 17:11  demo\src\action

     目录          0  2018-02-13 17:11  demo\WebRoot\js

     目录          0  2018-02-13 17:11  demo\WebRoot\lib

     目录          0  2018-02-13 17:11  demo\WebRoot\meta-INF

     目录          0  2018-02-13 17:11  demo\WebRoot\WEB-INF

     目录          0  2018-02-13 17:11  demo\.settings

     目录          0  2018-02-13 17:11  demo\src

............此处省略5个文件信息

评论

共有 条评论