wood burning stoves 2.0*
The moose likes Servlets and the fly likes uploading file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "uploading file" Watch "uploading file" New topic
Author

uploading file

Manaspratim Mitra
Greenhorn

Joined: Dec 27, 2005
Posts: 3
how does one write a servlet that uploads a file?
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Turns out, this question is actually HTML-specific.

Short tutorial.


A good workman is known by his tools.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Now that I think of it, your servlet will need to do some processing.

You can either write your own code or copy what has already been done.

See MultipartRequest for an example.

So maybe this thread could be moved to Servlets instead of HTML, but it still isn't related to anything on the SCWCD exam.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Moving to servlets....
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61760
    
  67

There is a JSP FAQ entry on this subject.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

http://faq.javaranch.com/view?FileUpload


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
chloe wong
Greenhorn

Joined: Aug 02, 2006
Posts: 17
you want to upload to a physical location or into BLOB table?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

chloe,
This post is almost a month old.
It's probably safe to assume that the original poster had solved his problem and moved on.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61760
    
  67

"amateur83",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The first screen name you had was valid.
Why did you change it?
chloe wong
Greenhorn

Joined: Aug 02, 2006
Posts: 17
oops, sorry. Already changed back my displayed name.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: uploading file