File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Upload code from this site Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Upload code from this site" Watch "Upload code from this site" New topic

Upload code from this site

Christopher Jursa

Joined: Jul 19, 2004
Posts: 4

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!


Divij Mahajan

Joined: Jul 26, 2004
Posts: 8
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

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.


-Divij<br />---------------------------------<br />Weinberg's Law: If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.
I agree. Here's the link:
subject: Upload code from this site
It's not a secret anymore!