Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Alma Austin   on Feb 04 In Java Category.

  
Question Answered By: Troy Kelley   on Feb 04

You have to create a config file, say, my-app-config.cfg.xml in which you put the path to the directory you want the uploaded files to be saved to.
the structure of your xml file  should be something like this:

<my-app>
<properties>
<property name="myapp.upload-path" value="/usr/opt/myapp/" />
</properties>
</my-app>

the given path above is in unix format.

so when your application  is starting up you are supposed to read the path from XML file and configure your application.

the simple way to create the config file is property files which may simply be read by Property resources

fiel name: myapp.properties
myapp.upload-path=c:/myfile/uploaded-files

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on help regarding the file saving on server side Or get search suggestion and latest updates.


Tagged: