File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Apache Commons FileUpload isMultipartContent() Deprecated. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Apache Commons FileUpload isMultipartContent() Deprecated." Watch "Apache Commons FileUpload isMultipartContent() Deprecated." New topic
Author

Apache Commons FileUpload isMultipartContent() Deprecated.

Alan Blass
Ranch Hand

Joined: Mar 21, 2010
Posts: 118
Hi!

I am using Apache Commons FileUpload and I am trying to to determine if it is multipart.



I am using netbeans and netbeans has crossed out the isMultipartContent, meaning it is deprecated. I pressed CTRL-SPACE and javadocs shows another method:

public static final boolean isMultipartContent(RequestContext ctx)

How should I use RequestContext in my JSP file? What should I enter as the argument for isMultipartContent?

Thanks for your help.
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

The ServletFileUpload.isMultipartContent(javax.servlet.http.HttpServletRequest) isn't deprected, but the FileUploadBase.isMultipartContent(javax.servlet.http.HttpServletRequest) is. Since the method is a static method, I think you still can use the ServletFileUpload.isMultipartContent(javax.servlet.http.HttpServletRequest).

From the javadocs

Use the method on ServletFileUpload instead.


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Why are you writing Java code in the JSP?!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apache Commons FileUpload isMultipartContent() Deprecated.
 
Similar Threads
problem with org.apache.commons.fileupload
java 1.6.0.20 doesn´t error uploading files because jar version
problem in using apache commons file upload:No class def found error
No class def found error in apache commons fileupload
Problem with org.apache.commons.fileupload