What is the best way to find a file on the servers disk without using web.xml?

          What is the best way to find a file on the servers disk without using web.xml?
          I want to find a configuration file not contained within the war file I have
          created. Is there a way to pass information into the ServletContext with out
          rebuilding the ear or war files? Tomcat 4.0 can do this in its server configuration
          files. Does BEA have the equivalent?
          Regards,
          Eric
          

You can specify the path to the file as a system property
          eg
          java -Dconfig.file.location=./mydirecotry/myfile.txt com.test.MyApp
          "Eric White" <[email protected]> wrote in message
          news:[email protected]..
          >
          > What is the best way to find a file on the servers disk without using
          web.xml?
          > I want to find a configuration file not contained within the war file I
          have
          > created. Is there a way to pass information into the ServletContext with
          out
          > rebuilding the ear or war files? Tomcat 4.0 can do this in its server
          configuration
          > files. Does BEA have the equivalent?
          >
          > Regards,
          > Eric
          

Similar Messages

  • What is the best way to edit photos and save changes across devices (without using iphoto)

    So I took allot of vacation photos with my iphone and created a photo stream so they can be viewed across devices. Some are dark and I would like to lighten them up and have the changes saved across devices. What is the best way? I originally tried saving all photos to my pc, editing them them, then syncing to all devices via my pc but, this creates 2 folders on my phone, the actual folder with said vacation name and a folder titled "photo gallery" with the exact same photo's. Not sure why it does that.
    Any suggestions?

    All photos transferred from your computer are saved in the iPhone's Photo Library. The photos in the album or albums below include a pointer only to the original photos stored in the Photo Library. The photos are not duplicated as in taking double the storage space.
    This way you can view the photos in an album only by selecting the album, or all photos in all albums by selecting Photo Library. The same applies if you transfer multiple albums or folders of photos, or a single album or folder.
    Similar to an iTunes playlist on your iPhone. You can listen to a playlist only by selecting the playlist, or listen to all songs by selecting Music. A song placed in a playlist is not duplicated as in taking up double the storage space.
    You can place the edits in the photo stream on your computer, or in the photo stream on your iPhone or other iOS device, and delete the originals in the photo stream prior to the editing.  

  • What's the best way to removed unwanted files?

    I have an iMac G4 running OS X 10.4.11 with 1GB of DDR SDRAM. I'm wondering what's the best way to remove unwanted files from the RAM, if it's even possible. There are apps and other files I no longer need. If I can dump the unused files will it help the computer run a little faster? Can I eliminate the unwanted files some how by myself or do I need a program that does it? Thanks

    bad dad wrote:
    I have an iMac G4 running OS X 10.4.11 with 1GB of DDR SDRAM. I'm wondering what's the best way to remove unwanted files from the RAM, if it's even possible. There are apps and other files I no longer need. If I can dump the unused files will it help the computer run a little faster? Can I eliminate the unwanted files some how by myself or do I need a program that does it? Thanks
    Applications are stored perminately on the harddrive [ Macintosh HD ]. When applications are running that is when they appear in a window, they take up RAM. You see your running applications by using activity monitor:
    Macintosh-HD -> Applications -> Utilities -> Activity Monitor
    Application when they are not running, they do not take up RAM.  You will not see any performance improvement when you delete an application from your Harddrive.  [ unless you have filled up your harddrive ]
    Best to have greater than 2gig of free space on your Harddrive.  Many posters to these forums state that you need much more free space: 5 gig to 10 gig or 10 percent of you hd size.
    Most applications do not take up much space on the Harddrive.  I copy my unused application to a folder named additional applications.
    (0)
    Be careful when deleting files. A lot of people have trashed their system when deleting things. Place things in trash. Reboot & run your applications. Empty trash.
    Go after large files that you have created & know what they are.  Do not delete small files that are in a folder you do not know what the folder is for. Anything that is less than a megabyte is a small file these days.
    (1)
    Run
    OmniDiskSweeper
    "The simple, fast way to save disk space"
    OmniDiskSweeper is now free!
    http://www.omnigroup.com/applications/omnidisksweeper/download/
    This will give you a list of files and folders sorted by size. Go after things you know that are big.
    (2)
    This will save you a gig of space.
    Monolingual is a program for removing unnecessary language resources from Mac OS X,in order to reclaim several hundred megabytes of disk space. It requires at least Mac OS X 10.3.9 (Panther) and also works on Mac OS X 10.4 (Tiger). It worked for me on 10.4
    http://monolingual.sourceforge.net/
    A detailed write-up on how to use Monolingual:
    http://www.jklstudios.com/misc/monolingual.html
    (3)
    These pages have some hints on freeing up space:
    http://thexlab.com/faqs/freeingspace.html
    http://www.macmaps.com/diskfull.html
    (4)
    Buy an external firewire harddrive.
    (5)
    Buy a flash card.

  • There are way too many photos on my internal hard drive. I have older libraries, and newer libraires in iPhoto and Aperture 2.  What is the best way to find and reduce the number of duplicate photos/libraries  before upgrading to Aperture 3?

    There are way too many photos on my internal hard drive. I have older libraries, and newer libraires in iPhoto and Aperture 2.  What is the best way to find and reduce the number of duplicate photos/libraries  before upgrading to Aperture 3?

    Sharon-
    Good idea.
    Back up first.
    I would probably wait for the merge function of the latest version before merging. Be sure to verify every merge.
    Merge Libraries, then from within Aperture move images to referenced on external hard drives.
    HTH
    -Allen

  • What is the best way to find the size of files?

    What is the best way to find the size of my files?

    Select a file or folder in the Finder and choose Get Info from the File menu.
    (125056)

  • What is the best way to send a file?

    i am writing a program and i want to transfer a file from a client class to a server class... what is the best way to do that?
    convert the file to bytes using the following
    File file=new File("jobs.xml");
               byte buffer[]=new byte[(int)file.length()];
               try {
                    BufferedInputStream input=new BufferedInputStream(new FileInputStream("jobs.xml"));
                    input.read(buffer,0,buffer.length);
                    input.close();
               } catch(Exception e) {//DIORTHOSE TA MSGS
                  System.out.println("reading jobs.xml->buffer: "+e.getMessage());
                  e.printStackTrace();
               firstServerRef.translationService(theCallbackObjectRef, buffer);for a reason i dont like that i am reading the file again to put it in the buffer and send the buffer... are my worries reasonable or not? is there any other better way to do that?

    Use a smaller buffer, repeatedly read and
    write, and print the exception's stack trace.
    What do you mean by reading again, by the way? I only
    see you reading the file once.hmm you mean use a smaller buffer and call the function with the smaller buffer many times in a while?
    the client and the server are not on a single machine and i want to call the function only once... could you clarify the thing that you said..
    yes you are correct that you see only one reading because i haven't pasted the rest of the code which is sth like...
    FileWriter fw = new FileWriter("jobs.xml");
               ObjectOutputStream out = xstream.createObjectOutputStream(fw);
         //      out.writeObject(new Jobb("ougk2", "Walnes",null));
              for(int i=0;i<nameOfServices.length;i++){
                   Jobb translationJob=new Jobb();
                   //find the service !
                 NameComponent nc = new NameComponent(nameOfServices, " ");
    // Resolve the object reference in naming
    NameComponent path[] = {nc};
    //create a ref for the servant of the service
    ServiceOperations theRemoteObjRef = ServiceHelper.narrow(ncRef.resolve(path));
    // JobOperations theRemoteObjRef = JobHelper.narrow(ncRef.resolve(path));
    translationJob.setObjServerRef(theRemoteObjRef.toString());
    if(i==0){ //this is the first job
         translationJob.setForTranslation(wordForTranslation);
         firstServerRef=theRemoteObjRef;
         out.writeObject(translationJob);
         out.close();
         File file=new File("jobs.xml");
              byte buffer[]=new byte[(int)file.length()];
              try {
                   BufferedInputStream input=new BufferedInputStream(new FileInputStream("jobs.xml"));
                   input.read(buffer,0,buffer.length);
                   input.close();
              } catch(Exception e) {//DIORTHOSE TA MSGS
         System.out.println("reading jobs.xml->buffer: "+e.getMessage());
         e.printStackTrace();
              firstServerRef.translationService(theCallbackObjectRef, buffer);
    which i believe is bad....

  • What is the best way to manage duplicate files?

    What is the best way to find and manage all my duplicate files? I have a Mac Mini late 2010, Mac OSX 10.6.8.

    I have never used this application, although I have considered getting it a few times.
    http://macpaw.com/gemini
    It's not free, but there is a free demo. If that means anything, the App Store sells it.

  • What is the best way to make video and audio the same lengths for posting on Web?

    YouTube recommends doing this to avoid sync problems. Maybe it will also make my videos run more smoothly. I'm talking here about random pauses I see in my movies on YouTube, not the uniform stuttering problem which I pretty much solved by redoing the movie at 30 fps instead of 24 fps. (Original is 18 fps Super 8 movie film.)
    Anyway, there is no sound during my titles. The soundtrack starts about 17 seconds in, and ends when the ending titles begin. So what's the best way to add silent audio? The best I can figure is to take some existing sound, put it in where the titles are, and turn the volume down to zero. Seems real workaround-ish, so to speak, to me. It seems to work. I even cranked it up on headphones to make sure there was no residual noice. But I'm curious if there's a better way? No biggie if not.
    Thanks.         

    I should have included the following:
    1.) Why can't I make a silent project in GarageBand? I have to instead find a project with a long enough song, make an "iLife preview" of it (see (2) below), copy it from the iMovie Music and Sound Effects browser to the end of the movie, and then open the audio panel and turn the volume to zero. And all this so that video websites don't get confused by a soundtrack that starts in mid-movie.
    2.) Why do I have to "render" them by the following process: Double-click a song in the iMovie Music and Sound Effects browser. You get a dialog box saying "The project "The Great Race" cannot be used because it was not prepared with an iLife preview. Would you like to open "The Great Race" in GB so you can save it with an iLife preview?" What I don't understand is why this new thing was introduced and why I have to do it via iMovie.

  • What is the best way to run .exe files on my mac?

    What is the best way to run .exe files on my mac? I need to run some updates for my john deere gps and the downloads i get can only be run on windows.

    There are several options for running Windows software (*.exe files) on a Mac, depending what your program is, how often you use it, and your personal preferences.
    One way that does not require Windows is an open source effort called WINE.  Check out winehq.org.  You may find that that's all you need for your programs.  There is also a commercial effort that has grown from WINE, and you will find info about it on the site mentioned.  These DO NOT require that you have and install Windows.
    If you want to run sessions devoted only to Windows software, and want programs to run as fast as they do on a PC, the Apple's Bootcamp program is useful.  With it you dedicate a partition on your hard disk to windows, and on startup choose to either boot into OS X or Windows.  Each runs without any connection to the other.  This requires you have a copy of the Windows software as well as the applications you want to run. 
    If you want to be able to easily exchange data between your Windows and Mac programs, and skip back and forth between the two, there are several emulators available that run on Mac OS X and create a Windows environment where many Windows programs can operate along side Mac programs.  Parallels and VMwear are two comercial packages available for purchase and Virtual Box is an open source effort available for free.  Google will find all three for you.
    My only experience is with Virtual Box.  It is slow and a bit clunky, but it is free and meets my needs for the very few "just got to have" windows programs I sometimes use.
    Google is your friend on this and can provide a lot more, and better, information than I can.
    Best of luck,
    Ray

  • What is the best way to protect my macbook on the internet

    what is the best way to protect my macbook on the internet, using mobile broadband?

    against what ? malware ?
    on Macs, all that's needed is common sense.
    Mac Virus/Malware Info

  • What is the best way to safeguard my files and pictures before I send off my MacBook Pro to get fixed?

    What is the best way to safeguard my files and pictures before I send off my MacBook Pro to get fixed? I am running Mavericks and use an AirPort Time Machine to back-up all my files.

    Back up all data on the internal drive(s) before you hand over your computer to anyone. You need at least two independent backups to be completely safe. There are ways to back up a computer that isn't fully functional—ask if you need guidance.
    If privacy is a concern, erase the data partition(s) with the option to write zeros* (do this only if you know how to restore to an empty drive.) Don’t erase the recovery partition, if present.
    Keeping your confidential data secure during hardware repair
    Apple also recommends that you deauthorize a device in the iTunes Store before having it serviced.
    *An SSD doesn't need to be zeroed.

  • What is the best way to connect my ipad to the high-speed Internet connection in a hotel room

    what is the best way to connect my ipad to the high speed inernet connection in a hotel room

    every connection is a bit different. Generally, connect to the wifi, then you may need to open Safari, and may even need to try to get to one of your bookmarked pages to trigger the 'agree to our terms' page to come up.
    As to it kicking you off every so often, there are sometimes glitches with the wifi on iPads, you can also be subject to any programming the hotel has. Like I've noticed various places that only allow you to log on for a period of time before having to relogin.
    most hotels have 1-800 numbers, so you can always try calling that to see if their tech support has any tips for the frequent disconnection issue.

  • What is the best way to connect my guitar to the usb port on my IMac

    This is for use with Logic Pro X
    what is the best way to connect my guitar to the usb port on my
    I-Mac

    As has been said really, the less you pay the less quality, and flexibility you'll have on your sound.
    For example, you could run on a 'Rocksmith Real Tone Cable' if you just wanted a cheap way of getting your guitar into the computer for some fun.  Probably cost you $30 (I live in UK so can't be sure).  If you're starting out then this could be considered the best option for dipping your toe in the water without spending too much.
    You won't get a really nasty sound out of that if you can process it yourself in Logic afterwards to clean up, but it won't be great either.  I imagine it could get quite noisy so you'd need to get heavily gating your guitar sound, if you're playing something clean that's not ideal.
    Longterm, you're far better getting a decent audio interface, as you need something to play sound back through, if you have different input sources you usually have to create an aggregrate device on osx to use multple sources at once esp if you're using the built in audio chip on your mac to listen. 
    All this can add latency and possibly sync issues (i.e. drum tracks not in time with audio etc.), although generally it's not too bad, but it's something worth knowing if you want to do things on the cheap without buying a dedicated interface.
    What kind of money did you want to spend? Are you thinking super duper cheap, and then see how it goes and maybe spend more in future if you enjoy it?  Personally i would say £100-150 would get your something good to start with, like that Presonus audiobox, there's a lot of options like that available.
    My local music shop always push the alesis io2 on new users, gotta say i'm not that overly impressed with it.  Line 6 stuff will be good however, but limiting.  Although i beleive you get their software for free with it?

  • What is the best way to merge a file content into log file

    What is the best way to merge a file content into log file.
    In worst case, I will read the file line by line as string, then use
    logger.info(lineString)to output to log file.
    However, is there better way to do this?
    The eventual log file will be something like:
    log message 1
    log message 2
    content from file line 1
    content from file line 2
    content from file line 3
    log message 3
    log message 4Thanks

    John618 wrote:
    Thank you and let me explain:
    1. What do you mean by better?
    I would like to see better performance. read line by line and log each line as string can be slow. Did you measure this and determine that it is actually a problem for your application? Or are you guessing?
    Regardless of what you do you are still going to need to read the file.
    >
    2.The only better way I can think of is not having to do it, but I assume you have a very good reason to want to do this.
    Yes, I have to do it beacuse the requirement is to have that file content be part of logging.
    Any idea?How is it supposed to be part of it? For example which of the following is better?
            File AAA - contents
                       First Line
                       Second Line XXX
            Log 1
                    2009-03-27 DEBUG: Random preceding line
                    2009-03-27 DEBUG: First Line
                    2009-03-27 DEBUG: Second Line XXX
                    2009-03-27 DEBUG: Random following line
            Log 2
                    2009-03-27 DEBUG: Random preceding line
                    2009-03-27 DEBUG: ----- File: AAA -------------
                    First Line
                    Second Line XXX
                    2009-03-27 DEBUG: Random following lineBoth of the above have some advantages and disadvantages.
    The first in a mult-threaded app can end up with intermittent log entries in between lines, so having log lines with thread ids becomes important.
    The first can be created by reading one line at a time and posting one at a time.
    The second can be created by reading the entire file as a single string and then posting using a single log statement.

  • What is the best way to name a file?

    What is the best way to name a file? Use "_" so that the characters make one, long name? Why do that?

    Another take on naming files, particularly image files, is like this:
    I use a file remaning application like Name Mangler to back, sequentially rename the photos.  I put them in a folder with a similar name.  Using the format I do, YYYY-MM-DD- Description-001.jpg, they are easy to sort by date by sorting alphanumerically.
    OT

Maybe you are looking for

  • IPod Nano 3G lo longer recognized after Update to iTunes 9 on Vista 32 Ulti

    So i updatedt to iTunes 9 yesterday - only to find out that my iPod 3G is no longer recognized by iTunes. Also my 2G are not recognized any longer on this machine ALL three iPods still work fine with my other computer whicgh is running the same Windo

  • Getting Hierarchial Query as XML (and maitaining the relationship)

    Pls find below sample table script and desired output format.XML output should maintain the hierarchy info which is the requirement.Also is it possible to do in single sql. Thanks. CREATE TABLE MAIN ID NUMBER, NAME VARCHAR2(20 BYTE) INSERT INTO MAIN

  • No entries in table SWN_DELSCHED

    Hi Experts, I'm doing business scenario configuration(SWNCONFIG), under Subscription Basic Data > Delivery Schedule parameter is required and the error message states that it is maintained in table SWN_DELSCHED. My problem is there is no entries in t

  • Starting IExporer.exe from java with J9 in an IPAQ

    Hi all, I'm trying to run IExplorer.exe from a java program in a IPAQ with j9 cvm. I did try it in Windows 2000 and it works fine but when running it in the IPAQ with Windows CE it throws an exception. Looks like the Exception is thrown because it ca

  • Compatible problems with Logic 9.1.6 and 96 i/O Digidesign

    Hi There, I am on Mac OSX 10.6.8. When loading Logic, the 96 i/O displays various signals on the input channels and for some reason, I can not use the dsp card of the interface with Logic on the DAE page and the signal are still continuous with selec