how to pass a file on local m/c to a web app

hi. i need to build a web application which takes a file kept on local m/c, as one of the inputs. How do i do that.

I tried to get the file in my servlet using getParameter(). This works locally but not for web application.

Please advice.

[257 byte] By [Mayank_03a] at [2007-11-27 10:51:04]
# 1

Do you mean uploading ?

Adi1000a at 2007-7-29 11:29:00 > top of Java-index,Java Essentials,Java Programming...
# 2

yes......

Mayank_03a at 2007-7-29 11:29:00 > top of Java-index,Java Essentials,Java Programming...
# 3

yes

Mayank_03a at 2007-7-29 11:29:00 > top of Java-index,Java Essentials,Java Programming...
# 4

Go through readings on uploading attachments in java-mail.

You may find out something to start with.

Adi1000a at 2007-7-29 11:29:00 > top of Java-index,Java Essentials,Java Programming...
# 5

ya...read a few things.....getParameter() in servlet won't work..... need to pass file name as an object rather than as a string .......... need help for that

Mayank_03a at 2007-7-29 11:29:00 > top of Java-index,Java Essentials,Java Programming...
# 6

I did this but long time back while working on a Books shop site where

images path had to be tracked.What if you use char value for / .

Adi1000a at 2007-7-29 11:29:00 > top of Java-index,Java Essentials,Java Programming...
# 7

that comes later...i need to get the initial step of uploading correct....how do i proceed with passing file as an object

Mayank_03a at 2007-7-29 11:29:00 > top of Java-index,Java Essentials,Java Programming...
# 8

> I tried to get the file in my servlet using

> getParameter(). This works locally but not for web

> application.

File uploading is not that simple a task. Read http://www.theserverside.com/tt/articles/article.tss?l=HttpClient_FileUpload

aniseeda at 2007-7-29 11:29:00 > top of Java-index,Java Essentials,Java Programming...