Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache Commons FileUpload isMultipartContent() Deprecated.

 
Alan Blass
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you writing Java code in the JSP?!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic