亚洲av午夜成人片精品网站,亚洲AV无码专区在线亚 ,亚洲AV电影院在线观看http://m.tkk7.com/mhl1003/category/46147.htmlzh-cnTue, 22 Jan 2013 14:12:02 GMTTue, 22 Jan 2013 14:12:02 GMT60Ext 上傳功能實現(xiàn)http://m.tkk7.com/mhl1003/articles/394198.html自由戰(zhàn)士自由戰(zhàn)士Mon, 14 Jan 2013 09:16:00 GMThttp://m.tkk7.com/mhl1003/articles/394198.htmlhttp://m.tkk7.com/mhl1003/comments/394198.htmlhttp://m.tkk7.com/mhl1003/articles/394198.html#Feedback0http://m.tkk7.com/mhl1003/comments/commentRss/394198.htmlhttp://m.tkk7.com/mhl1003/services/trackbacks/394198.htmlJS上定義上傳按鈕:
new Ext.Button({
 text : '上傳',
 iconCls : 'uploadIcon',
 handler : function() {
  var url = top.rootPath
    + "/public/extjs/mycomp/fileupload/upload.ou?method=uploadfile&linkId=-1";
  var dialog = new Ext.ux.UploadDialog.Dialog({
   id : 'uploadComp',
   url : url,
   title : '文件上傳__上傳過程中關(guān)閉窗口,不影響上傳',
   width : 450,
   height : 300,
   minWidth : 450,
   minHeight : 300,
   draggable : true,
   resizable : true,
   autoCreate : true,
   constraintoviewport : true,
   modal : true,
   post_var_name : 'mms',
   reset_on_hide : false,
   allow_close_on_upload : true, // 關(guān)閉上傳窗口是否仍然上傳文件
   upload_autostart : true
    // 是否自動上傳文件
   })

  dialog.show();
  //dialog.on('uploadsuccess', successfunc);

 }

后臺上傳功能實現(xiàn):

private void uploadfile(HttpServletRequest request,
        HttpServletResponse response){
      try {
      String json ="";
      String linkId = request.getParameter("linkId");
      if(linkId!=null && !linkId.equals("")){
    DiskFileItemFactory fac = new DiskFileItemFactory();
    ServletFileUpload upload = new ServletFileUpload(fac);
    List fileList = upload.parseRequest(request);
    Iterator iter = fileList.iterator();
    while(iter.hasNext()){
      FileItem fileItem = (FileItem)iter.next();
      if(!fileItem.isFormField()){
       String name = fileItem.getName();
                String fileSize = new Long(fileItem.getSize()).toString();
                if(name == null || name.equals("") || fileSize.equals("0"))
                       continue;
           
                String fileName = name.substring(name.lastIndexOf("\\")+1);
                   //存儲文件
                String suffix = name.substring(name.lastIndexOf(".")+1);
                String uuid = UUID.randomUUID().toString();
               // File saveFile = new File("d:\\upload\\"+uuid+"."+suffix);
              
                String staffId = LoginParams.getLoginStaff().getStaffId();
                String fileType = getFileType(suffix);
             
               
                //保存文件
                FileSystem hdfs = TThdfsHelper.getFileSystem();
 
          // 上傳文件到HDFS集群
           String path = TThdfsHelper.getFullPath("flowForm/2013/"+uuid+"."+suffix);
           InputStream input =  fileItem.getInputStream();
          //InputStream input = fileItem; // 輸入流,根據(jù)實際需要處理
           ActionResult uploadresult = hdfs.writeFile(path, input, true, true);
           TThdfsHelper.close(hdfs);
          
                FileVO fileVo = new FileVO();
                fileVo.setFileName(fileName);
                fileVo.setFileSize(fileSize);
                fileVo.setSuffix(suffix);
                fileVo.setUUID(uuid);
                fileVo.setFileType(fileType);
                fileVo.setStaffId(staffId);
                fileVo.setLinkId(linkId);
                int result = (Integer)BOCallProxy.executeBO("com.redsea.file.bo.FileBO",
                       "uploadFile", new Object[]{fileVo});
                if(uploadresult.getCode().equals(ActionResult.SUCCESS)){
                 json ="{'success':true,'message':'上傳成功'}" ;
                }else{
                 json ="{'success':false,'message':'上傳失敗'}" ;
                }
              
                
 
      }
     
    }
     JspUtil.writerPrint(response, json);
     }else{
        json ="{success:false,message:'缺少組件編碼'}";
        JspUtil.writerPrint(response, json);
     }
  // JspUtil.writerJsonPrint(response, json);
   
   
  } catch (FileUploadException e) {
   e.printStackTrace();
  } catch (Exception e) {
   e.printStackTrace();
  }
       
 }


 



]]>
MyEclipse 8.X安裝spket插件之安裝篇http://m.tkk7.com/mhl1003/articles/392972.html自由戰(zhàn)士自由戰(zhàn)士Fri, 14 Dec 2012 02:46:00 GMThttp://m.tkk7.com/mhl1003/articles/392972.htmlhttp://m.tkk7.com/mhl1003/comments/392972.htmlhttp://m.tkk7.com/mhl1003/articles/392972.html#Feedback0http://m.tkk7.com/mhl1003/comments/commentRss/392972.htmlhttp://m.tkk7.com/mhl1003/services/trackbacks/392972.html 

曹海峰個人博客

2010-11-22  16:13:21

原文鏈接

1665



1、下載spket
地址:http://spket.com/download.html,選擇Spket IDE 或Plugin下載.建議下載spket-1.6.18.jar即Spket  IDE,嫌麻煩的話可以直接跳到文末,里面有我在csdn中上傳的附件,本文所涉及的所有文件都在該附件下

2、安裝spket
a調(diào)出命令行窗口,執(zhí)行java -jar  spket-1.6.18.jar,稍等片刻會出現(xiàn)窗口,點“Next”即可(命令行窗口如何使用,怎么找到spket-1.6.18.jar的路徑我這里就不解釋了,哈哈,當(dāng)然jar文件的話你直接雙擊就ok了)

b選擇Eclipse Plugin以及MyEclipse 8 的安裝目錄下的common文件夾所在路徑,點“Next”

c跳出spket的安裝路徑選擇框,選擇路徑的原則是不要和MyEclipse的安裝路徑在一起,選好后,點擊“Next”即可安裝

d下載CreatePluginsConfig.zip,運行CreatePluginsConfig.java,運行前注意修改Main函數(shù)中spket的路徑,我的是C:\\spket\\eclipse\\plugins,運行,會有一段輸出,把輸出的內(nèi)容追加到MyEclipse  8.5\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info文件下

e重啟MyEclipse,我們就可以在preferences下看到spket了

spket-1.6.18.jar及CreatePluginsConfig.zip的下載地址:http://download.csdn.net/source/2851705



]]>
javascript中文亂碼解決方案http://m.tkk7.com/mhl1003/articles/390496.html自由戰(zhàn)士自由戰(zhàn)士Wed, 31 Oct 2012 01:36:00 GMThttp://m.tkk7.com/mhl1003/articles/390496.htmlhttp://m.tkk7.com/mhl1003/comments/390496.htmlhttp://m.tkk7.com/mhl1003/articles/390496.html#Feedback0http://m.tkk7.com/mhl1003/comments/commentRss/390496.htmlhttp://m.tkk7.com/mhl1003/services/trackbacks/390496.html
如果JavaScript在JS中的alert彈出的對話框出現(xiàn)中文亂碼則可以使用如下的方法

<script src="<%=request.getContextPath()%>/page/jsp/system/js/judgeusercode.js" charset="GBK" ></script>則alert不會彈出亂碼。

如果在ajax中要傳遞中文,如果服務(wù)器端以UTF-8接收的話

使用 var username=encodeURI(document.form1.username.value)進(jìn)行轉(zhuǎn)碼

且服務(wù)器端控制器加上request.setCharacterEncoding("UTF-8");

則可以解決中文亂碼的問題。

request.getContextPath()應(yīng)該是得到項目的名字,如果項目為根目錄,則得到一個"",即空的字條串。如果項目為abc, <%=request.getContextPath()% > 將得到abc。

]]>
主站蜘蛛池模板: 国产成人亚洲综合在线| 78成人精品电影在线播放日韩精品电影一区亚洲 | 7777久久亚洲中文字幕| 免费A级毛片在线播放| 亚洲bt加勒比一区二区| 成人爽a毛片免费| 亚洲精品亚洲人成人网| 两个人日本免费完整版在线观看1| 精品亚洲一区二区三区在线播放| 成人在线免费视频| 亚洲AV之男人的天堂| 一级毛片完整版免费播放一区| 亚洲欧洲久久久精品| 中国一级特黄的片子免费 | 成年网站免费入口在线观看 | 久久亚洲熟女cc98cm| 一级女人18毛片免费| 亚洲精品无码日韩国产不卡av| 国产无遮挡又黄又爽免费视频 | 亚洲真人无码永久在线观看| 日韩成人在线免费视频| 黄页网站在线免费观看| 国产成人精品日本亚洲专区61 | 国产亚洲精品无码专区| 久久久久国产精品免费免费不卡| 久久亚洲国产精品| 人禽杂交18禁网站免费| 国产亚洲视频在线观看网址| 国产亚洲?V无码?V男人的天堂| 久久午夜夜伦鲁鲁片免费无码| 亚洲二区在线视频| 亚洲av手机在线观看| 麻豆精品成人免费国产片| 亚洲xxxx18| 亚洲熟妇无码另类久久久| 国产92成人精品视频免费| 美女黄频a美女大全免费皮| 国产AV无码专区亚洲Av| 手机看黄av免费网址| 四虎影视久久久免费| 亚洲视频中文字幕在线|