JavaZOOM Web Site UploadBean homepage
  软件
  
安装
  
开发者指南
  
API & 设计
  
许可证

<< 返回

- 安装 -

UploadBean 是100%的JAVA/JSP/Servlets 上载组件。

在servlet engine上安装UploadBean点击 [普通] 安装。

[WAR] 存档文件使安装UploadBean更为简便。 这种方法需要支持SERVLETS 2.2+ API 或J2EE1.2+的应用服务器。 看安装说明.

如果有问题,请先阅读[常见问题解答] 如果问题仍不能得到解决请登陆我们的在线JSP论坛

普通安装

我们的下载包目录结构是与SERVLETS 2.2+ 兼容的。

Click to zoom in 你将在WEB-INF/lib 文件夹下找到若干JAR文件。 标准配置描述文件(web.xml) 在 WEB-INF/ 下,JSP文件在根目录下 (/) 大多数Servlet Engines 支持这样的 目录结构。 这样可使UploadBean的安装就像拷贝/粘贴一样。



安装步骤:

  1. cos.jar, struts.jaruploadbean.jar 加入到类路径CLASSPATH中。
    (例如:把以上文件放到WEB-INF/lib/文件夹下)。
  2. 拷贝 SimpleUpload.jsp, MultipleUploads.jsp, DatabaseUpload.jsp, ExceptionHandler.jsp 到web应用程序的根目录下。
  3. 编辑 SimpleUpload.jsp 和 MultipleUploads.jsp:改变上载类型参数(文件夹, ZIP 文件...)。
    更多信息 看开发者指南
  4. 运行:
    文档 : http://yourserver.com/uploadbean/documentation/index.html
    例 1 : http://yourserver.com/uploadbean/SimpleUpload.jsp
    例 2 : http://yourserver.com/uploadbean/MultipleUploads.jsp

    例 3: http://yourserver.com/uploadbean/DatabaseUpload.jsp
WAR 安装
UploadBean 也可以以WAR文件形式运行。WAR是SERVLETS 2.2规范中描述的Web应用程序标准存档文件
  1. 拷贝uploadbean.war 到你Servlet引擎的 Web应用程序文件夹下,这就可以了 :-)
    注意Web应用程序文件夹的名字将依赖于你的Servlet引擎,可能叫webapps/或applications/ 等等 WAR文件将被自动解压缩到uploadbean/文件夹下

  2. 第一次运行:
    文档 : http://yourserver.com/uploadbean/documentation/index.html
    例 1 : http://yourserver.com/uploadbean/SimpleUpload.jsp
    例 2 : http://yourserver.com/uploadbean/MultipleUploads.jsp

    例 3: http://yourserver.com/uploadbean/DatabaseUpload.jsp
    注意UploadBean还没有 被配置。

  3. 第一次运行后,停下你的引擎,根据需要编辑JSP文件, 浏览开发指南学习更多UploadBean参数。

UploadBean WAR 文件下载点击UploadBean HomePage.

FAQ
  • I get a 404 HTTP error when running SimpleUpload.jsp ?
    Check that ExceptionHandler.jsp file is in the same directory as SimpleUpload.jsp.
  • I get JSP Exception when running SimpleUpload.jsp ?
    SimpleUpload sample stores uploaded files under a folder. If this folder doesn't exist then UploadBean will try to create one. It will fail if the servlet engine doesn't have Read/Write access. Pay attention to use / or \\ file as separator too.
  • I get "uploads.zip not found" when running MultipleUploads.jsp ?
    MultipleUploads sample stores uploaded files under a ZIP archive. If this archive doesn't exist then UploadBean will try to create one. It will fail if the servlet engine doesn't have Read/Write access on this archive or on the parent folder.
  • I can't upload ZIP files with MultipleUploads.jsp ?
    Check the blacklist parameter in MultipleUploads.jsp sample.
  • I can't upload a big files (> 1MB) with MultipleUploads.jsp ?
    Check the filesizelimit parameter in MultipleUploads.jsp sample.
  • How to get StackTrace from ExceptionHandler ?
    Right-click and view HTML source, full StackTrace is in HTML comments.
  • Is there any lock for ZIP store access ?
    Yes, ZIP archive access is done through a synchronized Archiver class. There is only one instance of Archiver (singleton).
  • Is there any SQL script to create table for UploadBean + database store ?
    Yes, UploadBean has been tested under Oracle8i/9i (upload_oracle.sql), IBM DB2 UDB 7.2 (upload_db2.sql) and MySQL 3.23.51 (upload_mysql.sql).
  • DatabaseUpload.jsp returns an Exception ?
    Check that you've made modifications to <jsp:useBean ... /jsp:useBean> in DatabaseUpload.jsp that suits to your database configuration (Driver, URL, login, password). Check your JDBC driver is in CLASSPATH too.
  • DatabaseUpload.jsp hangs with Oracle ?
    Check you're using LONG RAW and not BLOB in your Oracle upload table. For BLOB support try the OracleBlobDBStore add-on.
  • How can I check or download a file uploaded in database ?
    We provide another 100% JAVA component : Download4J that downloads files from any folder, ZIP archive or Database.
  • Should I use COS or STRUTS multipart parser ?
    UploadBean uses COS as default one but STRUTS one is really good too.
    Try this link to learn more about pros and cons of multipart parsers.
  • How to add a progress bar when file is uploading ?
    You have to select Struts parser and implement your own UploadListener. You could find a ProgressStatus sample in our UploadBean add-ons section.

[News] [Applets] [Servlets] [Services] [Projects] [Links] [About]

Copyright © JavaZOOM 1999-2002

Java is a trademark of Sun Microsystems,Inc. All other company and/or product names are the property of their respective owners.