[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

JSP Multipart/Form-data Upload - Stalling Problem, Efficiency and Filtering.

Asked by LKL76 in Java Server Pages (JSP)

Tags: how, jsp, problem



Hi, this is a pretty important question and I am really hoping someone out there has the experience dealing with uploading, to help me out with this.

Summary.  I am developing an upload application that can let a user browse for a jpeg and upload it to be stored on the server.  We built something using the javazoom upload bean however for some reason when we use dialup to test the uploading it takes a very long time for the post to complete.  What I mean by this, is we setup a test page with just a very basic form.

FORM
---
<form name=form1 method=post action="uploadaction.jsp" enctype="multipart/form-data">
   <table width="60%" border="0" cellspacing="1" cellpadding="1" align="center">
        <tr>
            <td align="left">
                <font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>Select a file to upload:</b></font>
            </td>
        </tr>
        <tr>
            <td align="left">
                <font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
                    <input type="file" name="uploadFile" size="50">
                </font>
           </td>
        </tr>
        <tr>
            <td align="left">
                <font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
                    <input type="submit" name="submit" value="Upload">
                    <input type="reset" name="Reset" value="Cancel">
                </font>
           </td>
        </tr>
        <tr>
            <td align="left">
            </td>
        </tr>
    </table>
</form>

---

uploadaction.jsp

---

<%

out.println("Hello World!");
%>

---

What is baffling me is that we put a blank jsp page as the action, for example, in the form above, uploadaction.jsp is just a blank jsp page with

'hello world' on it.

In our internal network, from a client computer, I browse and select a files of varying sizes, and the Post takes longer and longer for each file as they get bigger.  However, nothing is being uploaded.  I have tried this in IIS and it happens just about instantaneously.

Over dialup, specifically AOL, the time it takes to see the hello world message increases from 2-3 seconds (30kb)... to about 5 minutes (1.5MB). I don't understand why there is such a large time difference.

Can someone offer to me an explaination to as why these Multipart/Form-Data Posts are taking so long if supposedly nothing is being uploaded.  Are there settings on the Tomcat side that could be causing these delays, the only i can think of is problems reading the headers.

Does someone have realworld experience on a project that needed to deal with this?  I understand that dialup will be of course slow but how does everyone else do it?

Below are some of the requirements and notes on what we are trying to do.

Requirements
Efficiency and Optimization - ability to scale to 1000's of concurrent users
Progress Bar - ability to see percentage uploaded
Allow only - JPG files
Stop transfer of files over 2MB.
No client side applet or activex control, must be able to use native browser.
Concerns, I don't want some 20 malicious users all sending 2 Gig files and crashing the server, how do we avoid that?

Currently using Javazoom Upload Bean on Tomcat on Solaris 9 (x86)


Other setups tested with the same results.

Tomcat on Windows 2000
Resin on Solaris 9

Any help, comments, best practices, suggestion would be very appreciated.

THANKS.
[+][-]05/21/04 03:44 AM, ID: 11125315Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Java Server Pages (JSP)
Tags: how, jsp, problem
Sign Up Now!
Solution Provided By: vikram_1982
Participating Experts: 1
Solution Grade: B
 
[+][-]07/08/04 06:04 AM, ID: 11501535Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92