Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

How to repalce cos.jar with Java commons fileupload

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Presently we are using cos.jar (MultiPartRequest) for file upload in our application,but it seems we have to migrate to java commons api for uploads .Can someone guide me on an alternative to MultipartRequest for getting uploads from sevlet http request in commons.

Also I tried the docs avail in Java commons fileupload site but didnt find a way out on how to encapsulate the request object as we did in Multipart request eg :requestObj = new MultipartRequest(request, appContext.getRealUploadDir(), Integer.MAX_VALUE);

pls help tis urgent
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

FileUpload works differently than COS, so I wouldn't expect to find class-by-class replacements. Have you gotten FileUpload to work at all? Its User Guide has a full example of how to do that, as does this article.
 
Gaurav Rawat
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your help ...

though had read the article in the link but was searching to go on similar lines as cos ...thinking of creating a multiparserequest class similar to cos using the commoms api ...


will such a approach http://myfaces.apache.org/tomahawk/xref/org/apache/myfaces/webapp/filter/MultipartRequestWrapper.html be good ? :roll:
 
Forget Steve. Look at this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!