CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 org.apache.commons.fileupload

Print topic Send  topic

Author Message
Joseph

Posts: 1
Posted: 01/29/2005, 2:01 PM

Hello,

I was reading an article about the org.apache.commons.fileupload component
here:
http://www.onjava.com/pub/a/onjava/2003/06/25/commons.html?page=3
and also here:
http://jakarta.apache.org/commons/fileupload/using.html

and it just seems not to work for me. I would appreciate your help.

I am using the jar file commons-fileupload-1.0-dev.jar that was downloaded from here:
http://cvs.gridsphere.org/cgi-bin/viewcvs.cgi/gridspher...oad-1.0-dev.jar

I work on eclipse and it does not compile.

The first problem is that it cannot find the method isMultipartContent in the following code (taken from that article

example):

// first check if the upload request coming in is a multipart request
boolean isMultipart = FileUpload.isMultipartContent(request);

I am looking in the eclipse into that jar and it seems like that method is really not in the FileUpload class.

What is wrong?

It is there in the source code, so why not in the class found in the far file.



By the way, when I looked at the jakarta reference here:
http://jakarta.apache.org/commons/fileupload/apidocs/index-all.html

and they say this method is deprecated:

"isMultipartContent(HttpServletRequest) - Static method in class org.apache.commons.fileupload.FileUploadBase
Deprecated. Use the method on ServletFileUpload instead."

So why do they use it in their code.


Also, they say "Use the method on ServletFileUpload instead".

That class is suppposed to be in the package:
import org.apache.commons.fileupload.servlet.*;

But there is not such a subdirectory in the zip source code I downloaded from the jakarta project.

Could you please help me solve these problems.

Thank you,
Joseph
View profile  Send private message
GK
Posted: 03/01/2005, 6:19 AM

place the jar file in this folder

....\\Your Java SDK Home directory\jre\lib\ext\

and us this import statement, u dont need anything else
import org.apache.commons.fileupload.*;

and just refer to this link that you already have for further customizations
http://jakarta.apache.org/commons/fileupload/using.html

also about isMultipartContent() being deprecated is only for the commons fileupload beta release 1.1, and api reference is also for 1.1
however the file you downloaded is version 1.0 which is the stable release.

hope this helps

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.