JavaZOOM Web Site UploadBean homepage
  Software
  
Installation
  
Developer Guide
  
API & Design
  
License

<< back

- Installation -

UploadBean is a 100% JAVA/JSP/Servlets upload component.

Read [General] instructions to install UploadBean samples on your servlet engine.

A [WAR] archive is available to make UploadBean installation easier. It needs a servlet engine SERVLETS 2.2+ API compliant or a J2EE1.2+ compliant applications server. See installation instructions.

Any problem ? Read the [FAQ] first. Still a problem ? Post your question to our online JSP Forum.

General Installation

Basically, our download package structure is SERVLETS 2.2+ compliant.

Click to zoom inYou will find JAR files under a WEB-INF/lib folder. The standardized deployment descriptor file (web.xml) under WEB-INF/ folder and JSP files under / folder (document root). Most of servlet engines are compliants with this structure so UploadBean installation is as easy as a copy/paste.



Here are basic steps to install UploadBean on your servlet engine :

  1. Add cos.jar, struts.jar, fileupload.jar and uploadbean.jar to the CLASSPATH of your web application.
    (e.g. : Put these files under WEB-INF/lib/).
  2. Copy JSP samples : SimpleUpload.jsp, MultipleUploads.jsp, DatabaseUpload.jsp, ExceptionHandler.jsp into the documentRoot of your web application.
    (e.g. : Put all these under a folder uploadbean/ in your web server).
  3. Edit SimpleUpload.jsp and MultipleUploads.jsp to modify upload parameters (store folder and ZIP archive) before launching your servlet engine.
    Browse the developer guide to learn more about UploadBean parameters.
  4. Run UploadBean samples :
    Documentation : http://yourserver.com/uploadbean/documentation/index.html
    Sample 1 : http://yourserver.com/uploadbean/SimpleUpload.jsp
    Sample 2 : http://yourserver.com/uploadbean/MultipleUploads.jsp

    Sample 3: http://yourserver.com/uploadbean/DatabaseUpload.jsp
WAR Installation

UploadBean is also available as a WAR archive. It's a SERVLETS 2.2 standard archive for Web Applications.
What does it mean ?... It means that WAR installation is as easy as a copy/paste, regardless to the servlet engine vendor.

  1. To install UploadBean WAR archive, copy uploadbean.war under the webapps folder of your servlet engine before running it. That's all :-)
    Note that webapps folder depends on your servlet engine. It could be webapps/, applications/ ... The WAR file will be automatically uncompressed under uploadbean/ folder.

  2. Run UploadBean for the first time :
    Documentation : http://yourserver.com/uploadbean/documentation/index.html
    Sample 1 : http://yourserver.com/uploadbean/SimpleUpload.jsp
    Sample 2 : http://yourserver.com/uploadbean/MultipleUploads.jsp

    Sample 3: http://yourserver.com/uploadbean/DatabaseUpload.jsp
    Note that at this step, UploadBean is running but not configured yet.

  3. Once launched for the first time, stop the servlet engine to configure JSP samples as you need. You should modify upload store folder and/or upload store ZIP archive. Browse the developer guide to learn more about UploadBean parameters.

The UploadBean WAR archive is downloadable at 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, STRUTS or CFU 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.
  • How to rename file after uploading ?
    You could find a FileMover plugin in our UploadBean add-ons section.
  • Upload speed is slow from Internet Explorer to Solaris/Unix server ?
    It's a known issue from Microsoft OS (Windows). Upload from Windows client to Windows server is fine, Upload from Unix client to Unix is fine too but Upload from Windows (Internet Explorer or Mozilla) could be slow (up to 10 times lower). The solution is to increase winsocket buffer on your Windows client. Check out the following URL (Microsoft support) to know which registry key to modify :
    http://support.microsoft.com/default.aspx?scid=kb;en-us;329781


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

Copyright © JavaZOOM 1999-2003

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