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

File uploading in jarred application -- URGENT!

Lijun An

Joined: Feb 05, 2002
Posts: 15
Hi gurus,
I have one ear which is deployed into WLS 6.1. In my ear, I would upload files from client into a folder on the server; I would use the same folder to download files from server to client. I have to jar the application for deployment.
I use web.xml to specify the directory for file upload/download. If it is a absolute directory, it's ok for upload. But an applet of the applicatin cannot get file from this directory. If it is in other directory form, then WLS 6.1 throws an exception stating the specified directory is not directory.
How should I specify the directory so that the servlet/JSP in the application can recognize the directory to upload/download files?
Thanks in advance.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

Usually this means you're using a relative filepath. As many before you have found, only an absolute path is 100% reliable - appservers tend to change their working directories without notice.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: File uploading in jarred application -- URGENT!
It's not a secret anymore!