当前位置: 首页 > news >正文

高密专业网站建设价格58同城做网站多少钱

高密专业网站建设价格,58同城做网站多少钱,90设计网站官网首页,郑州建站优化在项目中要用到jsp页面实现网页采集摄像头图像#xff0c;并实现上传的功能#xff0c;页面主要js调用的#xff0c;所以可以使用多种语言php,asp等都可以使用#xff0c;而且是跨浏览器的。可以整合的到SSH项目中和struts1或者struts2项目中使用方法1#xff1a;下载 pri…在项目中要用到jsp页面实现网页采集摄像头图像并实现上传的功能页面主要js调用的所以可以使用多种语言php,asp等都可以使用而且是跨浏览器的。可以整合的到SSH项目中和struts1或者struts2项目中使用方法1下载 printscreen4web-jsp.war(最下面有下载地址),然后放到tamcat目录webapp文件夹下面启动tomcat访问http://127.0.0.1:8080/printscreen4web-jsp/主要调用文件 1.index.html.2avatar.jspString imagepath1;//编辑页面中包含 camera.swf 的 HTML 代码public String renderHtml(String id,String basePath,String input){String outinput;try {outinput URLDecoder.decode(input);}catch(Exception e){System.out.println(解码错误!);}String[] tmp_inputoutinput.split();//input传递的类型和uid//System.out.println(input,tmp_input.length);String uc_api URLEncoder.encode(basePathupload/avatar.jsp);String urlCameraFlash camera.swf?nt1inajax1appid1inputinputuploadSize1000ucapiuc_api;urlCameraFlash ;return urlCameraFlash;}public String getFileExt(String fileName) {// 下面取到的扩展名错误只有三位而如html的文件则有四位// extName fileName.substring(fileName.length() - 3, fileName.length()); //扩展名int dotindex fileName.lastIndexOf(.);String extName fileName.substring(dotindex, fileName.length());extName extName.toLowerCase(); //置为小写return extName;}private byte[] getFlashDataDecode(String src){char []ssrc.toCharArray();int lens.length;byte[] r new byte[len / 2];for (int i 0; i len; i i 2){int k1 s[i] - 48;k1 - k1 9 ? 7 : 0;int k2 s[i 1] - 48;k2 - k2 9 ? 7 : 0;r[i / 2] (byte)(k1 4 | k2);}return r;}public boolean saveFile(String path,byte[]b){try{FileOutputStream fs new FileOutputStream(path);fs.write(b, 0, b.length);fs.close();return false;}catch(Exception e){return true;}}%String uploadtype request.getParameter(uploadtype);//图片上传类型:头像,logo,图片分别对应参数:head,logo,pic没有传递默认为PICif(.equals(uploadtype)){uploadtypepic;}//最终裁剪好的图片存放位置String uidrequest.getParameter(uid);imagepath1uploadtype/uid_big.jpg;String action request.getParameter(a);//String inputrequest.getParameter(input);String path request.getContextPath();String infoFilePath;String basePath request.getScheme()://request.getServerName():request.getServerPort()path/;if(actionnull){%body{margin: 0;border: 0;}function updateavatar() {var img1;if(window.opener.document.getElementById(imgpath1)){window.opener.document.getElementById(imgpath1).valueimg1;window.opener.document.getElementById(showimg1).srcupload/img1;}window.close();}out.print(renderHtml(5,basePath,URLEncoder.encode(uploadtypeuid)));%}else if(uploadavatar.equals(action)){//上传临时图片,可以自己实现//System.out.println(action);UploadUtil uploadUtil new UploadUtil();boolean isOk uploadUtil.initParam(pageContext,request);if (isOk false){System.out.println(页面出错 uploadUtil.getMsg());return;}//上传附件isOk uploadUtil.uploadFile();if (isOk false){System.out.println(页面出错 uploadUtil.getMsg());return;}Map map uploadUtil.getUploadFiles();if (map null){System.out.println(页面出错上传附件失败);}if (map.size() 0){System.out.println(页面出错没有上传附件);return;}//获取附件文件名和存储文件路径for (Iterator iter map.keySet().iterator(); iter.hasNext();){infoFilePath (String) iter.next();String infoFileName (String) map.get(infoFilePath);//infoFilePathinfoFilePath.substring(infoFilePath.lastIndexOf(\\)1);//System.out.println(infoFilePath);//infoFilePathinfoFilePath.substring(infoFilePath.indexOf(webapps)8);infoFilePathinfoFilePath.replaceAll(\\\\, /);//System.out.println(basePathuploadinfoFilePath);out.clear();out.print(basePathuploadinfoFilePath);}}else if(rectavatar.equals(action)){//缩略图String avatar1 request.getParameter(avatar1);//大String avatar2 request.getParameter(avatar2);//中String avatar3 request.getParameter(avatar3);//小String output ;try {output URLDecoder.decode(request.getParameter(input));}catch(Exception e){System.out.println(解码错误!);}String[] tmp_inputoutput.split();//input传递的类型和uidString pathff request.getSession().getServletContext().getRealPath(/) upload\\;String imgfilepathpathfftmp_input[0];imagepath1imgfilepath/tmp_input[1]_big.jpg;out.clear();boolean a1saveFile(imagepath1,getFlashDataDecode(avatar1));if(a1){out.print(?xml version\1.0\ ?);}else{out.print(?xml version\1.0\ ?);}}%
http://www.pierceye.com/news/45508/

相关文章:

  • 做淘客网站怎么公司注册网站系统
  • 烟台市建设工程质量监督站网站什么是响应式网站设计
  • 巴中公司网站建设商城网站建设公司电话
  • 关键词热度分析网站关键词排名优化系统
  • 想把一个网站屏蔽了怎么做wordpress书本目录模板
  • 做单页网站右糖视频制作
  • 歙县电子商务网站建设上虞网站建设哪家好
  • 厦门建站程序西青网站开发
  • 银川市做网站的公司国外 外贸 网站 源码
  • 网站源码下载了没有管理后台网页设计导航栏内容
  • 北京黄村专业网站建设价钱网站备案需要ftp吗
  • 电信宽带做网站建设网站300多块钱
  • 哪有做网站公司wordpress wpjson
  • 互联网网站设计塘厦仿做网站
  • 诸葛企业网站建设公司网络推广文案
  • 网站前端切页面时间wordpress 专业模板下载
  • 企业免费网站建设哪个品牌好珠海网站关键词排名服务商
  • 梅陇做网站孔夫子旧书网网站谁做的
  • 集团网站建设策划方案网站知识
  • 西安做网站公司 玖佰网络怎么开发网页游戏
  • 招商网站的建设目的专业网站优化公司
  • 珠海网站开发软件喜欢做网站
  • 做网站接专线费用wordpress 找不到主题
  • 建设网站需要的资源百度云 wordpress 固定链接
  • 建设网站找哪里网页图片批量下载
  • 公司的国外网站怎么建个人网站建设规划案例
  • 旅游网站建设公司东莞网站建站公司
  • 网站推广方案设计4399网页游戏大全
  • 个人如何做购物网站 关于支付接口长沙网站优化技巧
  • 上饶市建设局网站东莞seo建站公司