JSP Gurus.....

I have a general question about uploading large files (50megs... etc).

How does one provide a feedback to the user? Obviously over any (loosely termed)
bandwidth, uploading large files will take some time. Is there anyway to notify user
of "bytes read so far..."?

The technique I'm using is the following in myform.jsp

<FORM name="FileUpload" action="MyFileUpload.jsp" ENCTYPE="multipart/form-data"
method="POST" />
blah...blah...

<input type="submit" ... />

</FORM>

and in MyFileUpload.jsp

<HTML>
<FORM>
<jsp:useBean
     id="myUploadBean"
     scope="session"
     class="mycom.UploadBean" />
<%
myUploadBean.readRequest(request);
%>
</FORM>
<script language="JavaScript" >
parent.location="<%= myUploadBean.getWizardFrame() %>";
</script>
</HTML>

Obviously in the readRequest above, that is where the request is being read/parsed
and I can be printing information to standard out (System.out.println). Since
MyFileUpload.jsp is being rendered on the server (reading/parsing file uploaded)
nothing is being shown to the user.

In addition, this bit of code above is part of a Wizard that I'm doing in JSP. So
the above code is step X of Y steps (hence the parent.location="<%=
myUploadBean.getWizardFrame() %>"; statement)

I'm rather new to the JSP/HTML/JavaScript arena. So I believe b/c of the technology,
I can't "push status" to the user through the browser. BTW, this wizard has no
applet associated with it.

Thanks...Jim


Clair e Simon wrote:

> Hi Everyone,
>
> I'm doing a web site in JSP and I need to upload files in a folder on my server.
>
> Someone know how to do this or where on the Net I could have more information?
>
> Thank you
>
> Simon
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to