Webapp - where to store user files?

Hi All,
My app is packaged in a WAR file, which gets expanded by servlet container during deployment.
The app operates with folders containing user data (files uploaded by users, email templates, etc).
Where should I create these user data folders - inside the webapp directory structure or outside?
If outside - will I be able to access them from my servlet?
If inside - how do I protect these folders from overwriting when a new WAR version is expanded?
What is the best practice in this case?
Maybe it's a trivial question, but I coudln't find a definite answer... I would really appreciate some help!

There are a number of solution to your problem:
1. if you wish to deploy your app using a war file then you will have to package your user data
everytime you make a new deployment (which resides in your development directory), and if that user date changes then you will have to maintain that change (i.e. in the development and deployment directories)
so that in your next deployment you don't loose any changes.
2. If you don't want to maintain changes to your user data in two places, then a simple way is not to deploy
using a war file. Keep your user data in one place (within your web-app deployment directory), and simply place any changes (html, jsp, and servlet classes) to your application to the appropriate place.
3. If none of the above approach is suitable then think about maintaing these user data in a database and
thus be done away with problems relating to directories and files.
Hi All,
My app is packaged in a WAR file, which gets expanded
by servlet container during deployment.
The app operates with folders containing user data
(files uploaded by users, email templates, etc).
Where should I create these user data folders - inside
the webapp directory structure or outside?
If outside - will I be able to access them from my
servlet?
If inside - how do I protect these folders from
overwriting when a new WAR version is expanded?
What is the best practice in this case?
Maybe it's a trivial question, but I coudln't find a
definite answer... I would really appreciate some
help!

Similar Messages

  • I am getting an error message with my snap scan ix500 that says the Evernote is not installed properly.  I have uninstalled/reinstalled evernote but it still doesn't work.  Anyone know where evernote stores their files on a Mac/

    I am getting an error message with my snap scan ix500 that says the Evernote is not installed properly when I try to transfer it.  I have uninstalled/reinstalled evernote and the scan snap softward but it still doesn't work.  Anyone know where evernote stores their files on a Mac?  Or had this problem.

    Are there any dialog boxes popping up behind your Yahoo screen?
    I have intermittent problems attaching files in Yahoo mail and this is usually the reason.  I'm also using an iMac (10.7.3) and this is likely the problem.
    It is generally a Yahoo issue rather than a Mac problem.

  • How do you CHANGE the location (away from Drive C) where Firefox stores temporary files?

    I know where Firefox stores temporary files. I want to CHANGE this location away from Drive C to decrease writes to an SSD. Thank you.

    Thank you.
    This function may be one of the few things that IE does better than Firefox. IE lets you change the temporary file location in Tools - Internet options - Settings. Firefox developers should make this task easier and put the instructions in the Help file where they can be easily found.
    Since I use an SSD for Drive C, I have learned that any file(s) that are frequently written to should be moved elsewhere to a conventional HDD.

  • Where to store PDF Files?

    Hello,
    I need to store PDF files on my application server. Where can I put them under the application.
    Thanks in advance

    I think it is a good idea NOT to store it under (== within) your application. That makes updates of the app easier and the pdf's can be maintained without touching the webapp. And vice versa.
    WLS offers you the possibility to link any local drive to a web application. Just define this virtual drive in weblogic.xml :
    <virtual-directory-mapping>
    <local-path>c:\mydir\mypdfs</local-path>
    <url-pattern>/mycontext/*.pdf</url-pattern>
    </virtual-directory-mapping>
    -Kai

  • Where to store text file in Oracle9iAS created by java.io

    Hi,
    I am developing an simple application in which i have to create a text file through java.io in Runtime. I am able to create the text file but not able to store the file int he Oracle 9iAS as it is giving the error, Permission denied. I am storing my JSP files in the Oracle Application Server. I want to know the exact place where i can store the text file in Runtime.
    Thanks in Advance...
    Sivakumar

    The test.txt file should be in the 'Run Directory" of your Project. Select Project.jpr and invoke Project settings dialog.
    Click on the Runner. You will see the "Run Directory" edit field.
    For ex.
    package mypackage;
    import java.io.*;
    public class ReadData
    public ReadData()
    public static void main(String[] args)
    new ReadData();
    try{
    File fin = new File("test.txt");
    if (fin.canRead())
    System.out.println("Can read file");
    I am geting a error message of file not found. Please advise
    in which directory should I place the text file "test.txt" so that the java program can read from it.
    Thanks,
    agsp

  • RH8 and where it stores project files

    Hi all, I'm remotely supporting some colleagues in another country who will be connecting to my RH project via our corporate LAN. The project is in RH8 HTML (webhelp) and using Robo SourceControl 3.1. They're running Win XP SP3 (I know, I know).
    I can get them connected to the project OK in RSC, but when opening the project in RH8 it's taking hours upon hours! The project local store is a local drive e.g. c:\RH8.
    They have admin permission on their PC.
    One thing we noticed is that the files from the C: drive folder are also somehow finding their way into the user profile desktop (desktop icons are disabled on the corporate setup). The profile is stored on the LAN and is filling her profile space up - but I suspect this is also the cause of the epic slowness.
    Any ideas on how I can stop RH mysteriously mirroring from C: to the user's profile?

    Thanks... I'm now onsite in Spain (tough life eh) and I still can't fathom what the issue is other than RH just doesn't like our network!
    We created a new empty project and that works fine, connects to source control and works in RH8 as expected.
    But the original project will not load up just just freezes for hours and never unfreezes! The size of that project is only around 30MB so the network traffic shouldn't be heavy..
    Not sure about the issue of files from c: getting mirrored to her desktop, I can't reproduce it, so not going to worry about that for now!
    If anyone has any ideas on why this project would fail to load in RH8, please shout!
    Otherwise we are going to have to rebuild on the new project

  • Ejb exampples and i want to know where to store java files and how make jar file and how to run

    hi,
    I am Nidhin Benjamin.This is the first i am working in Weblogic81 and EJB also.please
    can you tell about whole procedure and from where i want to start and

    Hi Nidhin,
    You could start by reading the EJB docs at
    http://e-docs/wls/docs81/ejb/index.html and playing with the examples at
    C:\bea810\weblogic81\samples\server\examples\src\examples\ejb20
    - Nick
    "Nidhin Benjamin" <[email protected]> wrote in message
    news:3ff127ff$[email protected]..
    >
    hi,
    I am Nidhin Benjamin.This is the first i am working in Weblogic81 and EJBalso.please
    can you tell about whole procedure and from where i want to start and

  • Change partition and directory path where iTunes stores music files

    Hi
    My system partition is full, but I have 90 GB freespace on a 2nd internal HDD. I would like move my entire iTunes music library to the 2nd HDD. How do I do that? How do I configure iTunes to look there for the library and to save new music to that new path in the future?

    There is an Apple article on moving your iTunes Music folder here:
    http://docs.info.apple.com/article.html?artnum=301748

  • Where does Designer stores user defined custom colors?

    Hi,
    Everytime I restart Designer, all my custom colors are reset to white. Which is pretty annoying. So I want to export them to a file at least.
    I figured, that user defined custom colors in Windows are stored in the Registry in:
    [HKEY_CURRENT_USER\Control Panel\Custom Colors]
    or alternatively in:
    [HKEY_USERS\.DEFAULT\Control Panel\Colors]
    But apparently they are not. Changes made to the custom color palette in Designer are not stored in the registry. Those values still remain FFFFFF.
    Does anyone know, where Designer stores user defined custom colors? Is there a 'secret' undocumented .ini-file I missed?
    Regards,
    Steve

    Does anyone know where the information added by Java reside?Essentially, in the directory.
    Is there any way to query this information using VC++ dll or some other way?Yes, there are operating system APIs for it. That's how Java does it.
    Does anyone know which windows dll or classes are used by Java to add these custom attributes
    I tried lot by digging into code by decompiling java NIO classes but could not get it.I would try looking up the Windows API myself.

  • Where should I store my files?

    I just bought my first Mac, a Mac mini. I also have two pc's that I use less and less. I have been storing all of my videos, mp3's, etc.  on a 1 tb NAS (dns-321). I was hoping to maintain that system, but it seems from my reading that some Mac programs, (iTunes, iPhoto) almost require the files to be on the Mac mini to work well. It seems I can't point iPhoto to look to my NAS for all of my photos.  Is that generally true? I am having difficulties figuring out what where to store my files and then back them up properly. Plug the nas into the mini and then buy a time capsule to back up both? Put a 1tb extra drive in the mini, move all of my files to that and somehow use the nas as a backup device? Ugh! Thanks!

    I'm not familiar with iPhoto so I can't help there.
    But iTunes libraries don't have to reside on an internal
    drive.  I personally have all my iTunes library along
    with my other multimedia material residing on a 2 TB USB
    drive attached to an Airport Extreme Base Station (Apples
    wireless router).  I also have a second 2 TB drive attached
    to it as well for backup.
    Now I do know that some NAS drives can be problematic.
    You can post in the iTunes forum for more direct help on that.
    You may also post in the iPhoto forum as well.

  • When i send a file over iChat to another mac it compresses the file, where is this compressed file stored?

    Today i was transfering a few folders with pictures and videos over to another mac and I noticed that before i sent the file iChat would compress it.  Now this is understandable because they were fairly large files, over 2GB, and this would make them transfer faster.  The problem is that I was transfering the files because my mac is low on hard drive space and I was trying to free some up.  By compressing the files first it was using up more space on my hard drive and I quickly cancelled the compression.  I soon realized though that my hard drive space was still disappearing into thin air. I only had 6GB left and was running out fast.  As it reached 2GB I began to quickly delete large files I no longer needed hoping that I wouldn't run out of space. It dropped all the way down to 12.4MB before it finally stopped, even with me deleting files.  I'm not quite sure what was happening to all of my hard drive space, but was wondering if maybe iChat continued to compress the files even after I cancelled the compression.  Anyways if anyone knows why this happened or where iChat stores the files it compresses that would be greatly appreciated.

    Hi,
    I have heard of this before.
    One report suggested it was only PDF files their case.
    I cannot replicate it with any pic files (Over 2Gb) PDF or otherwise or files and folders combos.
    My tests were from Lion/iChat 6.0.3 to Snow Leopard (iChat 5.0.3)
    I would have thought iChat would have created the Zippped/Stuffed files in the same folder as the original items
    (i.e pic in the pictures folder (or relevant subfolder) and other files and documents in the Documents folder.
    With any application that does Stuffing/Zipping it will create temporary space for doing so.
    Much like the way a graphics app creates a Scratch file to keep the 20 or so Undos it works with.  (with graphic Apps you can make the Scratch file on another Drive if you have one which can help)
    Do this:-
    with iChat Open go to the Window Menu.
    Select the File transfers item
    In this Window (that pops up) select the File that was going to be Transferred.
    When it is highlighted then do a Right-Click or Control Click and select the option to Show in Finder
    Does it list the zipped file ?
    10:21 PM      Friday; February 10, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Where to store data when you have a single app, users can purchase add-ons for the app, and each such purchase needs new files

    Hi, I have a hub app and need to give users the option to purchase various add-ons. For each such ad-on, I need to download a new set of files. Where would such files be stored, and how does it work when a new purchase is made? I cant seem to find any
    documentation to guide me.
    Thanks and regards,
    Lynn

    Hi  Lynn,
    Read something about in-app purchase documentation:
    Enable consumable in-app product purchases
    You can definitely store your file somewhere in your server when the customer buy your product, your app validated, download from that place.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Where does WebMail store user preferences

    I have enabled WebMail on my server. Each user that logs in is able to change its preference settings at WebMail, e.g. # of msgs. shown per page, etc..
    This is okay, but when I delete a user, I guess that there is a config file left somewhere.
    Has anybody an idea where WebMail stores the user preferences for each user and how to properly delete them when removing a user from the system ?

    /var/db/squirrelmail/data/
    See pdf doc: Properly Deleting OS X 10.4.x Server Mail Users, on following page...
    http://osx.topicdesk.com/downloads/
    -david

  • Where to store customized modelsuppo​rt2 and reportgen*​.seq files

    We currently put all customized model and front end sequences under c:\Documents and Settings\...\TestStand 4.1\Models etc. We have since customized modelsupport2.* and reportgen*.seq files found in Program Files\NI\TestStand 4.1\Components\Models\TestStandModels. Question is where to store these customized files. There is an assortment of subfolders under Documents and Settings\All Users\Documents\NI\TestStand 4.1.
    Solved!
    Go to Solution.

    What version of Windows do you have?
    The file structure in All Users\Documents\NI\TestStand 4.1 should be similar to that in Program Files\NI\TestStand 4.1.  Essentially they are equal.  The key is TestStand looks in the All Users Directory first.  If it doesn't find it there then it goes into the Program Files one.  You can verify this by opening your search directories (Configure>>Search Directories).  Look for a item in the list called Public components directory.  Look at the path for that.  The very next entry should be TestStand components directory.  Look at the path for that.  They both have Subdirs checked.  If you were to switch those around (meaning TestStand components directory before Public components directory) then TestStand would grab the default files and not the ones you modified.
    So you should put modelsupport2 in Documents and Settings\All Users\Documents\NI\TestStand 4.1\Components\Models\TestStandModels\modelsupport​2.*
    reportgen*.seq should go in the same folder.
    If those folders don't exist then create them.  You can probably get away without creating them and just placing it all in the base dir (Documents and Settings\All Users\Documents\NI\TestStand 4.1) but I recommend structuring it the same so you don't get confused and it has the same look and feel.
    Hope this helps!
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Where to store mysap.properties file?

    Hello,
    I'm trying to test application Test User Management under SAP J2EE engine of SRM UM. When I run page:
    http://mysite:54000/logon/TestUM
    there is an message:
    Test is disabled, please specify UM_TESTUM=true
    I assume that this "UM_TESTUM=true" setting should be put in mysap.properties file. My question is where to store mysap.properties file?
    Somewhere here?
    c:\usr\sap\SRM2_UM\j2ee\j2ee_40\cluster\server\services\servlet_jsp\work\jspTemp\logon\
    Thanks
    m./

    Path for tat file is:
    c:\sapmarkets\properties\mySAP.properties
    BR
    m./

Maybe you are looking for

  • EFI Update 1.2 on Late 2013 Macbook Pro...

    Hello, I have the late 2013 15" Retina Macbook Pro with the processor upgrade (2.6Ghz.).  The model number of the system is Z0PU.  I want to download and install the EFI 1.2 update found on this page: http://support.apple.com/kb/DL1705 But when I go

  • How to Read the Screen Fields after a Transaction ?

    Hi all, I am working on the Transaction 'O4K_LICENSE'. After the transaction is run, it generates an Internal License number which is displayed on the screen. I tried using 'GET PARAMETER', but as the CALL TRANSACTION is called within a loop, the SAP

  • ITunes freezes on backing up iPad while updating the software to ios 8.

    iTunes freezes on backing up iPad while updating the software to ios 8. Please help asap

  • Dynamic Object for Checkbox in HTMLB control

    Hi all, I want to create dynamic object for Checkbox in HTMLB control. I have created dynamic check box in JSP using JSPDynpage. I can select multiple values in the list of checkbox.After clicking the submit button , I have to read the value of check

  • Doesn't launch - hangs

    I have installed this twice and rebooted. No change. When I click to launch media player, the little orange box displays and says "reading preferences...." and never goes away. I click the media player to launch it again and the tool opens up. But no