In Which Directory Should I Put the Configuration File?

I am using Servlets and JSPs. I have code like:
private static final String OPTION_FILE_NAME = "mvnplugin_mvnforum_MVNForumConfig";
    static
       ResourceBundle res = ResourceBundle.getBundle(OPTION_FILE_NAME);
       MVNFORUM_HOME       = res.getString("MVNFORUM_HOME").trim();
       WEBMASTER_EMAIL     = res.getString("WEBMASTER_EMAIL").trim();
       LOGO_URL            = res.getString("LOGO_URL").trim();
       String supportedLocales = res.getString("SUPPORTED_LOCALES").trim();
       SUPPORTED_LOCALE_NAMES = StringUtil.getStringArray(supportedLocales, ";");
    }And "mvnplugin_mvnforum_MVNForumConfig.properties" is a configuration file. Please advise regarding the directory in which this properties file is supposed to be for my code to read it properly.

Somewhere in your classpath, typically /WEB-INF/classes.

Similar Messages

  • Where should I put the configuration file?

    Hi
    I'm developping a web application using IBM's websphere as my application server. My application reads configuration information from a properties file.
    My question is: what's the right location to put the configuration file? Should I provide a fixed path, or should I just put in the webserver's execute directory?
    Thanks in advance
    Pedro

    I'd consider what the configuration file is cheifly
    tied to.
    If there are only a small number of parameters then
    put them into the web.xml as initial parameters and
    access then via servlet cotext.
    If they are tied to some class, then I'd put the
    properties file next to the relevant class file and
    use getClass().getResourceAsStream().
    If they relate to the web-app as a whole, I'd put
    them in the WEB-INF directory and access then using
    getServletContext().getResourceAsStream("WEB-INF/xxx.p
    roperties");The one thing you definitely shouldn't do is use an
    absolute file path.Thanks for the reply.
    Forgive my ignorance, but how can I access getServletContext from my web application?
    Thanks again!

  • In which directory should i keep java class files in oracle apps

    hi
    I have one problem, In which Top & directory should i keep java class files in oracle apps
    krishna

    Hi
    By itself its available in oracle\visappl\au\11.5.0\java\
    thats were the location needs to be placed in the apps.zip.
    Thanks
    Riyas

  • Which directory shall I put the new songs into stepmania

    Hello, I have installed stepmania 5 alpha 1 via AUR, and now I want to add many new songs into stepmania, I went to stepmania's official website for help but there is no clear answer to this question. Could someone tell me how to make it ? Thank you in advance!

    I find it , it is /opt/stepmania//Songs/StepMania 5,I don't know why stepmania's official website doesn't provide much support to linux its version.
    When I tried to put my question to AUR , it said I logged on first, but after I submitting my account and password ,which I expected shall be the same as that of Arch forum, it replied either my account name or password is not correct.

  • When installing Firefox 35 into Windows 7 running inside VMware Fusion on a Mac, into which folder should I put the downloaded Firefox installer file?

    Inside Windows I see a folder called PROGRAM FILES and another one called PROGRAM FILES (X86). Is either of these the correct one to put the Firefox installer program into before I launch the installer? There is also a folder called WINDOWS. Sorry for such an elementary question but I've never been a Windows user; just Macs so far until now. My intention is to download the Windows version of Firefox using a browser on the Mac side of the computer since I have working browsers there. Then I would copy the ".exe" file to whichever Windows folder is correct. Am I on the right track or am I courting disaster?
    Also, will there be a preference inside Firefox to make it the default browser in the Windows environment? I'd like to avoid using Internet Explorer.
    ( I'm writing this from the Firefox browser, v. 28.0 in the Mac OS (10.6.8). I didn't click the "Automatically Add" button for submitting troubleshooting information because I'm not asking about the browser in the Mac OS environment.)
    Thank you.

    The full Windows install file from for instance https://www.mozilla.org/firefox/all/ is an executable dot.exe file.
    It will run from anywhere the user has the correct permissions, incluing the desktop or the downloads folder. It will offer standard or custom installs, usually opt for the standard install and the necessary flies and folders will be created.
    * [[How to download and install Firefox on Windows]]
    Setting Firefox as the default browser may be done from an option as Firefox starts after installation
    * [[Make Firefox your default browser]] -> (the KB page does have selectors)
    ** https://support.mozilla.org/kb/make-firefox-your-default-browser#firefox:win7:fx35

  • In which folder should i save my jsp file in tomcat

    Hi,
    Actually i have installed j2sdk1.4 as well as Apache tomcat 4.1.2 version. Now i m very confused that in which directory should i save my JSP files to run the files in tomcat.
    If possible pls give me alternate options also.I'll be highly thankful to u.Also is it needed to configure tomcat?
    In waiting
    thanx
    Jassi

    as far as i know, jsp can go anywhere in your webserver directory. if installed correctly that is. its like php, if u know anything about that.

  • Where should I put the sevlet

    I just started to work with Tomcat and I compiled the helloWorld sevlet.
    It's said from a book that the sevlet should be placed in serlver_root/webapps/ROOT/WEB-INF/classes, however there isn't a "classes" folder in my WEB-INF folder. So I put the helloWorld sevlet in the WEB-INF folder.
    Then I type http://localhost:8080/servlet/helloworld in my browser, I get a message from the sever said "The requested resource (/servlet/HelloWorld) is not available".
    Could anybody tell me how can solve this prolbem, where should I put the sevelt?

    have ones more a look to your book - especially to information about the configuration file "web.xml" which also should be placed in the WEB-INF folder. This file defines which servlets should be found by the server and which request-URL should be mapped to this servlet.
    for examples concerning the web.xml file see those already defined in your server. copy one and edit it for your needs. if you really want to understand what else might be configured using web.xml see the DTD for this file - it's pretty good documented!
    hope it helps :)

  • After install OAS10gr2, which ORACLE_HOME should I put in .profile?

    After install OAS10gr2, which ORACLE_HOME should I put in .profile to export? Infrastructure or Mid-tier ?
    Thanks

    Hi,
    which ORACLE_HOME should I put in .profile to export?The Linux .profile is for setting-up your Linux environment, and it gors into Linux directories. The OS .profile can be global (/etc/profile) or local (as specified in each users /etc/passwd) for each OS user. I have notes here:
    http://www.dba-oracle.com/linux/important_files_directories.htm
    My Oracle Press book "Oracle Application Server 10g Administration Handbook" has lots of details on 10AS configuration:
    http://www.amazon.com/Oracle-Application-Administration-Handbook-Osborne/dp/0072229586
    Hope this helps . . .
    Donald K. Burleson
    Oracle Press author

  • Where should i put the DEFAULT&SMARTBAR

    Hello,
    where should i put the DEFAULT&SMARTBAR ? and the main Menu ?
    in order to be shown in each form..
    in using Forms 6i.
    Regards,
    Abdetu..

    Hello Gerd,
    Thanks for reply..
    put such things into *a reference form* what is meant by a reference form do u mean the main form?
    Create a property class (PC) for your FORM-MODULE-properties,
    put this PC into the reference form.
    Create there an object group (OG), put the PC into the OG and the inherit the OG to your local form.
    Automatically you have then the PC inherited too.i did all what u mentioned..
    Bbut the problem is that the DEFAULT&SMARTBAR
    can't be seen in allllllllllll my forms in the main menu inspite of i put it into the form module property ->in the intial menu property.
    Regards,
    Abdetu..

  • Where Should I put the time capsule?

    Where Should I put the time capsule?
    I'm using a wireless modem/router provided by the internet company, and both (the TC and the router) are located next to the pc, in the living room . Using this way, I don't have signal in my bedroom. Should I get a signal amplifier?
    Thanks!

    It would be better to use EOP adapters (homeplug is another name) or ethernet to locate the TC closer to your room.. you can use another apple router to extend the wireless if you need to.

  • I need to Add the configuration file '.airinstall.cfg' to the air bundled runtime installer directory. where do i get the airinstall.cfg from

    i need to Add the configuration file '.airinstall.cfg' to the air bundled runtime installer directory. where do i get the airinstall.cfg from what are the contents of the .airinstall.cfg file please help.

    http://helpx.adobe.com/acrobat/kb/acrobat-downloads.html

  • Which situation should we use the text item with the item category TATX

    Dear experts!
    Thank you for your attention!
    I am confused with text item (TATX).
    which situation should we use the text item with the item category TATX????
    Someone told me that the text item is dummy and should be used as a manual of certain standard item. But the manual may be a book or several papers and it also takes up some inventory not a dummy.
    So, could some body tell me what the text item (TATX) exact is and what function it has.
    Best regard!
    Tangdark

    Hi,
    you can use TATX if you like to enter a text and to print some information between the item lines.
    Regards
    William

  • Imac is no longer able to open the Configuration file

    Hi ,
    I have an imac ( ilamp) 20' connected to ADSL, via Netopia Router which is connected to the Airport extreme connected to imac, for the PB Aluminum Tiger 10.4.5. we both can connect. PB can print via imac/printer.
    The imac is no longer able to open the Configuration file, when i enter the pswd which is correct, i get the message "The Airport Admin. Utility was unable to read the configuration of the selected base station an error occurred while reading the configuration "
    My Beau updated Airport to V5.7, this is the first time since the update I've tried to access the conf. file for the imac which i have done numerous times prior.
    I have a new base station Ip address 254.128.0 in Airport Utility Admin, on the imac which does not reflect my network settings anywhere, and is not what it use to be, i think, it was one value different than the PB.Base station IP. I do not know how it changed neither one of us changed it.
    I tried using the Airport Setup assistant (imac), I received this message:
    "Appropriate Airport hardware was bot found on this computer,if you recently
    Installed, an Airport card,please shut down your computer$ make sure the card is properly istalled."
    The imac does not have a card, nor do i think it needs one.
    I would like to be able to at least open the configuration file.
    Thank you for reading my post.
    Eme
    Power PC G4 (3.3) iMac♥ Flat Panel 10.3.9 & 15 Alum.PowerBook Tiger   Mac OS X (10.4.4)  

    Hi Kes, a star for the company !
    I made an error on my first post I have a Netopia modem, Airport router.
    And so it remains, i guess that there must be an easy answer somewhere
    that I am missing that I/we should read, some direction to that would be helpful, and I would be very appreciative.
    As I said the password had been set, and it is not an issue of that being forgotten, i wondered if it was changed back to "public" tried, not it.
    particular because everytime the imac wakes one of the folders on ( no one else in office just me and boyfriend and it is his work folder he has a copy on the PB.( the folder on desk top has been clicked on, the one with sensitve info, i have backed the folder up and secure trashed it, just in case some security issue hacking has taken place, thats closing the barn door after the fact.
    Good luck,w/ this Q.
    regards Eme
    Power PC G4 (3.3) iMac ♥ Flat Panel 10.3.9 & 15 Alum.PowerBook Tiger   Mac OS X (10.4.5)  

  • Cannot find the configuration file in classpath

    Cannot find the configuration file /oracle/apps/prc/po/....applicationModule/common/bc4j.xcfg in the classpath.
    Hi!
    I'm trying to run the following code:
    String appModule = "oracle.apps.prc.po.manageDocument.uiModel.viewDocument.applicationModule.ViewPurchasingDocumentApplicationModule";
    String cfg = "ViewPurchasingDocumentApplicationModuleLocal";
    ApplicationModule applicationModule = (ApplicationModule)Configuration.createRootApplicationModule(appModule, cfg);
    I get this error message:
    Exception in thread "main" oracle.jbo.ConfigException: JBO-33001: Cannot find the configuration file /oracle/apps/prc/po/manageDocument/uiModel/viewDocument/applicationModule/common/bc4j.xcfg in the classpath
         at oracle.jbo.client.Configuration.loadFromClassPath(Configuration.java:430)
         at oracle.jbo.common.ampool.PoolMgr.createPool(PoolMgr.java:293)
         at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:557)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1334)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1312)
         at oracle.apps.prc.po.manageDocument.model.viewPdf.generateXml.getXMLData(generateXml.java:26)
         at oracle.apps.prc.po.manageDocument.model.viewPdf.generateXml.main(generateXml.java:39)
    I have checked and the config file does exist in the correct directory, and I can see it in my Application Module - Configurations. Any idea why this is happening? Am I supposed to configure something specifically for this or add it in my classpath? If so, how am I supposed to do it?
    Thanks
    Mansi
    Edited by: Mansi G on Oct 6, 2008 11:56 AM

    Where is the code you posted? Running in a separate project, I assume? Does that project have a dependency on the project containing the app module specified?
    And just to check (although by default, JDev should do this for you)--the app module project has been compiled since adding the configuration, right? You need to check to make sure the config exists not only under Project/src, but under Project/classes.
    Edited by: Avrom Roy-Faderman on Oct 6, 2008 2:02 PM
    Oh, and BTW--I assume this is not a typical ADF application, right? In a standard ADF application, you would very rarely need to instantiate an application module in code like this; you could just let the data binding facility do it for you. The technique like the one you're using is most appropriate for purely programmatic, no-UI cases. (e.g., once I tried to implement an SMTP server backed by business components. That was an appropriate case for ditching databindings and doing the sort of thing you're doing, because it had no view layer (because it had no UI to render).

  • Problems saving values in the configuration file

    Hello,
    I'm upgrading one of my projects from VS2005 (with .NET 2.0) to VS2013 (with .NET 4.5). I have a setup project in my solution, but this is no longer supported and I have to change to InstallShield
    deployment project. With the old setup project my app runs fine, but now with InstallShield I have a problem. I install the application in this folder: C:\Program Files (x86)\CompanyName\AppName. I use .config file to read and write some parameters.
    Reading parameters goes well, but when I write new values in the .config file a get one error. When I used the old setup project, at writing time the system created new .config file in C:\Users\me\AppData\Local\VirtualStore\Program Files (x86)\CompanyName\AppName
    (this is named isolated storage, isn't it? :S).
    These are all changes I made in the solution:
    When I opened the solution with VS 2013 the migration process went well (some warnings and messages) except setup project (of course).
    I upgrade all projects to .NET Framework 4.5 (Project properties -> Application -> Target framework).
    I have intalled InstallShielld Limited Edition and added and configured the new deployment project.
    I think that these are all changes. And this is the source code where I get the exception:
    public void SetXParamValue(string value)
    try
    Configuration conf = ConfigurationManager.OpenExeConfiguration(Application.ExecutablePath);
    conf.AppSettings.Settings["XParam"].Value = value;
    conf.Save();
    catch (Exception e)
    MessageBox.Show("Error setting X param.");
    And this is the exception:
    Exception messsage:
    An error occurred loading a configuration file: Access to the path 'C:\Program Files (x86)\CompanyName\AppName\oy25i1se.tmp' is denied. (C:\Program Files (x86)\CompanyName\AppName\ExeFile 1.0.192b.exe.config)
    Stack trace:
    at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll)
    at System.Configuration.Configuration.SaveAsImpl(String filename, ConfigurationSaveMode saveMode, Boolean forceSaveAll)
    at System.Configuration.Configuration.Save()
    at VisualizadorCabecera.FormPrincipal.EstablecerIdioma(CultureInfo idioma)
    Inner exception messsage:
    Access to the path 'C:\Program Files (x86)\CompanyName\AppName\oy25i1se.tmp' is denied.
    Stack trace:
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean
    checkHost)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
    at System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated()
    at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile)
    at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension)
    at System.Configuration.Internal.WriteFileContext..ctor(String filename, String templateFilename)
    at System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext, Boolean assertPermissions)
    at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext, Boolean assertPermissions)
    at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext)
    at System.Configuration.ClientConfigurationHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext)
    at System.Configuration.UpdateConfigHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext)
    at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll)
    Any suggestions? I have to configure something else?
    Thank you,
    Jon.

    > "With the old setup project my app runs fine"
    Actually, I disagree.  Your configuration file is sitting alongside your application, in a directory that
    should be protected from changes by "regular" users and it's
    only running because Windows is intercepting your attempt to write under C:\Program Files* and rerouting those attempts to a "Virtual Store" location.  By the sounds of it, something your new installer is doing is [quite rightly]
    stopping this from happening (IIRC, virtualisation can be turned off for a program and, IMHO,
    should be).  
    You need to move the configuration file to a location that the user can write to (somewhere under C:\Users\username), even if you have to copy it the very first time it's needed. 
    Regards, Phill W.

Maybe you are looking for

  • How can I merge my old apple id with my new apple id?

    How can I merge purchases I made with my old apple id (an aol sign in) and my new apple id (a .mac id)?

  • I can no longer drag and drop pages into my bookmarks toolbar in the new firefox

    I uninstalled firefox to try google crome. Now i have uninstalled crome, and gone back to firefox. After restarted my computer i put the bookmark toolbar up but i can no longer drag sites into the bar. When i do it opens them in a whole new window. W

  • Setup new iPod Touch with previous backup

    I have bought a new iPod Touch and wish to restore it to a back up of another iPod Touch.  I have found out that this is possible, but I want to have that new iPod sync with an iTunes library on another computer. Is it possible for it to do so or wil

  • TS3642 Crash during a cloud upload=Lost data?

    I back up my files to the cloud very often, but now I feel weary about it. I sent a song I created to the cloud and GarageBand crashed in the middle of it. When I reopened the app, I saw the song needed to be downloaded from the cloud (which I though

  • Effet "pages tournée" avec Indesign (CS6) et Acrobat (X)

    Bonjour- Faire un PDF incluant l'effet "pages tournées" avec indesign puis Acrobat Pro fonctionne très bien, cependant je n'arrive pas à avoir ma première et dernière page seule- Elle sont systématiquement accolées à une page blanche (double page)- J