`
taiyang.yu
  • 浏览: 18688 次
  • 性别: Icon_minigender_1
  • 来自: 西安
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

jsp图形展示页面

阅读更多
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
   
    <title>My JSP 'MyJsp.jsp' starting page</title>
   
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">   
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->

<script language="javascript" type="text/javascript">
function createXmlHttpRequest(){
if(window.ActiveXObject){
return new ActiveXObject("Microsoft.XMLHTTP");
}else if(window.XMLHttpRequest){
return new XMLHttpRequest();
}
}
var xmlHttpRequest;
function testdx(){
var str;
var t=0;
var radios=document.getElementsByName("radio");
for(var i=0;i<radios.length;i++){
if(radios[i].checked==true){
str=radios[i].value;
}
}
if(str=="联系人类型"){
t=0
}else if(str=="公司"){
t=1
}else if(str=="职业"){
t=2
}else if(str=="职位"){
t=3
}else if(str=="职称"){
t=4
}else if(str=="城市"){
t=5
}else if(str=="性别"){
t=6
}
var url="contactInfo.do?method=createPie&radioName="+t;
t=-1;
xmlHttpRequest=createXmlHttpRequest();
xmlHttpRequest.onreadystatechange=haoLeJiaoWo;
xmlHttpRequest.open("post",url,true);
xmlHttpRequest.send(null);
}
function haoLeJiaoWo(){
if(xmlHttpRequest.readyState==4&& xmlHttpRequest.status==200){
var std=document.getElementById("images");
std.src=xmlHttpRequest.responseText;
}

}
</script>
</head>

<body onload="testdx();">
<table width="100%" height="100%" border="1">
  <tr>
    <td width="120" height="27" align="center"><strong>图表分析</strong></td>
       <td width="1092">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1020"><center><strong>图表显示区</strong></center></td>
  <td width="50"><input type="button" align="left" value="关闭" onclick="window.close();" /></td>
</tr>
</table>
</td>
  </tr> 
  <tr>
    <td width="120">
<form action="" method="post" id="form1">
<table cellpadding="3" cellspacing="2" border="0" align="center" height="550" width="118">
<tr><td><input type="radio" id="radio" name="radio" value="联系人类型" onclick="testdx();" checked="checked"/>联系人类型 </td></tr>
<tr><td><input type="radio"  name="radio" value="公司" onclick="testdx();"/>公司</td></tr>
<tr><td><input type="radio"  name="radio" value="职业" onclick="testdx();"/>职业</td></tr>
<tr><td><input type="radio"  name="radio" value="职位" onclick="testdx();"/>职位</td></tr>
<tr><td><input type="radio"  name="radio" value="职称" onclick="testdx();"/>职称</td></tr>
<tr><td><input type="radio"  name="radio" value="城市" onclick="testdx();"/>城市</td></tr>
<tr><td><input type="radio"  name="radio" value="性别" onclick="testdx();"/>性别</td></tr>
</table>
</form>
</td>
<td width="920" rowspan="8">
<img id="images" name="images" border="1" width="900",height="550">
</td>
  </tr>
</table>
</body>
</html>
/***************************bing************************/
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%@page import="crm.web.action.Photos"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ page import="java.io.PrintWriter"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
   
    <title>My JSP 'bing.jsp' starting page</title>
   
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">   
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
     
  </head>
   <%
//饼状图
String fileNamePie=Photos.generatePieChart(session,new PrintWriter(out),800,600,"asdf");
String graphURLPie = request.getContextPath() + "/servlet/DisplayChart?filename=" + fileNamePie;
%>
  <body>
    <img src="<%= graphURLPie %>" width=800 height=600 border=1 />
  </body>
</html>

分享到:
评论

相关推荐

    网上零食商城(ssm+bootstrap+jquery+AngularJs+EasyUI)项目源码+mysql数据库文件

    此项目是基于ssm(spring+spring mvc+mybatis)框架开发的零食商城系统,前后端分离(含有权限管理,高德地图地位,ECharts图形展示等技术),可当作毕业设计。项目详情请查看功能截图。该系统能够方便满足相关人员...

    基于SSM框架的员工管理系统源码

    - SVG图形文件:1个,用于展示矢量图形。 本项目是一个基于SSM(Spring、SpringMVC、MyBatis)框架的员工管理系统,旨在通过现代的Web技术,为企业管理提供一个高效、稳定、易于维护的信息化解决方案。

    网站设计大赛方案.doc

    网站设计大赛方案 为展示我院近年来教育改革与发展的成就,增强网站设计相互交流,配合"大雁型" 人才培养模式,提高学生实践技能,培养企业实用人才,为此举办特滨州职业学院网站 设计大赛,实施方案如下。...

    网站设计大赛方案(1).doc

    网站设计大赛方案 为展示我院近年来教育改革与发展的成就,增强网站设计相互交流,配合"大雁型" 人才培养模式,提高学生实践技能,培养企业实用人才,为此举办特滨州职业学院网站 设计大赛,实施方案如下。...

    JAVA核心技术

    页面可以做的很漂亮,结合echopoint,可以作出很多图形效果(里面用了jfreechart包)。使用SWING的思想来作网页,把HTML当作JAVA的类来做。但是大量使用Session,页面分帧(Frame)很多,系统资源消耗很大。??免费。?...

    深入浅出Hibernate源码

    3,在jsp页面中,指定页面采用UTF-8编码. ;charset=utf-8"%&gt; 假若在您的项目中,必须使用GBK编码,则在以上的各个地方,都需要把UTF-8更换为GBK方可正常使用。 版本更新 ----------- v1.2 (PLAN,TBD) * 转换到...

    Google Android SDK开发范例大全(完整版)

    余志龙,来自于手机制造业、电视媒体业、网络、电信产业、软件开发等领域,擅长嵌入式系统软件设计、J2ME游戏开发、Android开发,以及J2EE、JSP、Servlet、JavaBeans、PHP、C#等程序语言,熟悉面向对象技术与Eclipse...

    深入浅出Hibernate

    useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8 3,在jsp页面中,指定页面采用UTF-8编码. ;charset=utf-8"%&gt; &lt;br/&gt;假若在您的项目中,必须使用GBK编码,则在以上的各个地方,都需要把UTF...

    Google Android SDK开发范例大全(第3版) 1/5

    余志龙、陈昱勋、郑名杰、陈小风,分别来自手机制造业、电视媒体业、网络、电信产业、软件开发等领域,擅长嵌入式系统软件设计、J2ME游戏开发、Android开发,以及12EE、JSP、Servlet、Java Bean、PHP、C#等程序语言...

    Google Android SDK开发范例大全(第3版) 4/5

    余志龙、陈昱勋、郑名杰、陈小风,分别来自手机制造业、电视媒体业、网络、电信产业、软件开发等领域,擅长嵌入式系统软件设计、J2ME游戏开发、Android开发,以及12EE、JSP、Servlet、Java Bean、PHP、C#等程序语言...

    Google Android SDK开发范例大全(第3版) 3/5

    余志龙、陈昱勋、郑名杰、陈小风,分别来自手机制造业、电视媒体业、网络、电信产业、软件开发等领域,擅长嵌入式系统软件设计、J2ME游戏开发、Android开发,以及12EE、JSP、Servlet、Java Bean、PHP、C#等程序语言...

Global site tag (gtag.js) - Google Analytics