CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
英特尔®游戏设计大赛100美元现金周周送 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  应用服务器

紧急救命关于jspSmartUpload

楼主df4000(电子之鹰)2003-08-01 19:35:55 在 Web 开发 / 应用服务器 提问

请问使用tomcat做服务器,如果要使用jspSmartUpload应该如何配置。  
   
  我试了很多次   快疯了   请哪位大侠救救吧 问题点数:100、回复次数:2Top

1 楼lynx1111(任我行:一个PLMM看着就兴奋的男人)回复于 2003-08-02 13:38:07 得分 80

<%@   page   language="java"   import="com.jspsmart.upload.*"%>  
  <jsp:useBean   id="mySmartUpload"   scope="page"   class="com.jspsmart.upload.SmartUpload"   />  
   
  <HTML>  
  <BODY   BGCOLOR="white">  
   
  <H1>jspSmartUpload   :   Sample   2</H1>  
  <HR>  
   
  <%  
   
  String   name   =   (String)   session.getValue("username");  
   
  //   Variables  
  int   count=0;                  
   
  //   Initialization  
   
  mySmartUpload.initialize(pageContext);  
   
  //   Upload  
  mySmartUpload.upload();  
   
  //   Select   each   file  
  for   (int   i=0;i<mySmartUpload.getFiles().getCount();i++){  
   
  //   Retreive   the   current   file  
  com.jspsmart.upload.File   myFile   =   mySmartUpload.getFiles().getFile(i);  
   
  //   Save   it   only   if   this   file   exists  
  if   (!myFile.isMissing())   {  
   
  //   Save   the   files   with   its   original   names   in   a   virtual   path   of   the   web   server                
  myFile.saveAs("/upload/"   +   myFile.getFileName());  
  //   myFile.saveAs("/upload/"   +   myFile.getFileName(),   mySmartUpload.SAVE_VIRTUAL);  
   
  //   sample   with   a   physical   path  
  //   myFile.saveAs("c:\\temp\\"   +   myFile.getFileName(),   mySmartUpload.SAVE_PHYSICAL);  
   
  //     Display   the   properties   of   the   current   file  
  out.println("FieldName   =   "   +   myFile.getFieldName()   +   "<BR>");  
  out.println("Size   =   "   +   myFile.getSize()   +   "<BR>");  
  out.println("FileName   =   "   +   myFile.getFileName()   +   "<BR>");  
  out.println("FileExt   =   "   +   myFile.getFileExt()   +   "<BR>");  
  out.println("FilePathName   =   "   +   myFile.getFilePathName()   +   "<BR>");  
  out.println("ContentType   =   "   +   myFile.getContentType()   +   "<BR>");  
  out.println("ContentDisp   =   "   +   myFile.getContentDisp()   +   "<BR>");  
  out.println("TypeMIME   =   "   +   myFile.getTypeMIME()   +   "<BR>");  
  out.println("SubTypeMIME   =   "   +   myFile.getSubTypeMIME()   +   "<BR>");  
   
  count   ++;  
                                                   
                                                   
  }  
   
  }  
   
  //   Display   the   number   of   files   which   could   be   uploaded    
  out.println("<BR>"   +   mySmartUpload.getFiles().getCount()   +   "   files   could   be   uploaded.<BR>");  
   
  //   Display   the   number   of   files   uploaded    
  out.println(count   +   "   file(s)   uploaded.");  
   
   
  %>  
  <%  
       
  %>  
  </BODY>  
  </HTML>Top

2 楼lynx1111(任我行:一个PLMM看着就兴奋的男人)回复于 2003-08-02 13:41:12 得分 20

把com.jspsmart.upload.SmartUpload考到WEB-INF/classes目录下  
  在上文件同级目录下新建文件夹upload~!!Top

相关问题

  • 紧急,,关于jspSmartUpload上传问题
  • 紧急,紧急!
  • !!!!!!!!!!!!!紧急
  • !!紧急!!
  • 紧急~~~~~~~~~~~~~~~~~~
  • 紧急~~~~~~~~~~~~~~~~~~
  • 紧急!!!
  • 紧急!!!
  • 紧急
  • 紧急

关键词

  • jspsmartupload

得分解答快速导航

  • 帖主:df4000
  • lynx1111
  • lynx1111

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo