How to install.

There is 4 - step for install. Each step is easy and simple..





Step 1. Download.

You can download library file and applet file in download page.



Step 2. Copy library file and unzip applet file

Copy library into 'WEB-INF/lib' directory. And make '/uploadprogress' directory. Unzip applet files into '/uploadprogress'



Step 3. Input applet tag into html source.

Open html source containing uploading form, and insert applet source in the right place.

<applet code="mty.uploadprogress.Progress.class" codebase="uploadprogress" name="progressapplet" width="361" height="32" id="progressapplet" MAYSCRIPT> </applet>

You have to fix attribute of 'codebase'. That value have to be the related directory unziped applet source. For example, Applet sources are upziped to '/uploadprogress' and html document is located at /doc/uploadform.html, Then that attribute is '../uploadprogress' or '/uploadprogress'.

You cans modify 'width' and 'height' attributes as you want.





When 'form' tag does not have 'onSubmit' attribute :

Edit form tag like this.

<form name="addForm" method="post" action="uploadaction.jsp" enctype="multipart/form-data"

onSubmit="try { document.applets['progressapplet'].connect(); } catch(e) { }" target="uplaod">

When 'form' tag does have 'onSubmit' attribute :

Insert following source into 'onSubmit' attribute.

try {

document.applets['progressapplet'].connect();

} catch(e) {

}



Step 4. Modify upload source.

Open upload source file, You have to modify 'request' that offers to upload package before package parses requests. That is, you have to modify two part like following.

First, Insert code '<%@ page import=" ... , mty.uploadprogress.UploadProgress"%>' for import package.

And second, Offer 'UploadProgress.getServletRequest(request)' value instead of 'request' to upload package.



Example 1) If you use 'Jakarta commons fileupload' package.

You have to fix code from 'upload.parseRequest(request);'

to 'upload.parseRequest(UploadProgress.getServletRequest(request));'.



Example 2) If you use 'com.orelly.servlet' package.

You have to fix code from 'MultipartRequest multi = new MultipartRequest( request, webroot+"WEB-INF/temp", sizeLimit, new DefaultFileRenamePolicy() );'

to 'MultipartRequest multi = new MultipartRequest( UploadProgress.getServletRequest(request), webroot+"WEB-INF/temp", sizeLimit, new DefaultFileRenamePolicy() );'.