• 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

How to separate the users file (like a pdf or exel file) from war application

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

My problem is quit common for virtually every aplication
My application is accepting files from user (.pdf or .xl or .doc)
Those files are now saved in a directory withing the application.

When ever I try to update the war file on the production server, the files added
by users get overwritten ( or deleted as folder is overwritten). Please can some one give me an idea how to use
ftp to upload and again download files from the server (including the authentication of user if
the file is requested by typing the code in address bar.)

Or if there is any better way to separate the user files from the source file of war.

I m using Websphere application server 6.0 on an iSeries (V5R4).

Thank you in advance.


Rahul Ashar.

 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rahul,
There are two parts to your question. First, you can and should store files in a different directory by specifying an absolute path when you store them on a server.

Second, it's better not to give your users FTP rights to your server. It is better to provide a servlet that intercepts the upload and download requests. This is much more secure.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic