• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Upload code from this site

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have an abnormal question for regular visitors.

I am creating a web site that requires the user to upload a file to our server to be processed. One of my former co-workers used some code she found on the Internet. I can't find out where for the life of me.

However, I noticed a jar file she uses entitled "javaranchCommonPart1.jar", which is why I am here.

Does anyone know what files (from this site) she may have used? Is this jar file a common file in an upload script from this site?

Thanks for humoring me!

Cheers,

Chris
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Chris

Two ways to use servlets to upload using MIME types are

- application/x-www-form-urlencoded
- multipart/form-data

The third is to use a FileUpload API. U can get one from http://jakarta.apache.org/commons/fileuploads.

To checkout a few examples of how to write a servlet class using these APIs, please refer the following books

1. OReilly's "Java Servlet Programming"
2. Servlets and JSPs - The JeEE Technology Web tier" by Jayson Falkner and Kevin Jones.

Let me know if you still have queries.


Cheers!!
 
reply
    Bookmark Topic Watch Topic
  • New Topic