Path for WebApplication home directory?

Hi
I have a webapplication in which I need to create a directory at the same level as WEB-INF. The way I like to implement is that the path should be read from a .properties file. What path should be given such that the directory is always created at the same level as WEB-INF?
I hope the question is clear. Pls help me in this.

ServletContext.getRealPath("/") should do

Similar Messages

  • Time to search PATH varies by HOME directory path ?

    I have a rather strange question, as I am running in a somewhat strange environment. I have a SunBlade running Solaris connected via Cisco VPN to my corporate network. After I start the VPN I run a number of mount commands to make my local environment look something like my environment in the office, including mounting my home directory onto my local workstation. I then change the value of the HOME variable to point to the nfs mount for my home directory and update the PATH so that my local (non-remote) bin directories are before the ones on my remote mounts (I use Solaris at work as well).
    I've been running this way for a couple of years and it works well, but all of a sudden trying to start an application from my local system started to take a really long time. I narrowed it down to:
    if I set HOME=/export/home/localuser it works fine
    if I set HOME=/export/home/remoteuser (which is where my home directory is mounted) it does not
    It is not the PATH itself as I have the problem even when i don't change it at all. I have a copy of dtpad in /export/home/localuser/bin and that path is the first value in the PATH variable. With HOME set the first way "time which dtpad" takes 0.269s and with it set the second way it takes 4.530s.
    This does not make any sense to me. Can someone that understands how the PATH searching algorithm works shed some light on this ?
    Thanks

    One more thing. I delete the copy of dtpad in my home directory and let it find the real one using the PATH. With HOME set to the local directory it took 0.527s to find it. With HOME set to the remote directory it took 2.139s. Same PATH in both cases. So how does $HOME fit into the $PATH search ?

  • Wrong path while creating Home-directory

    Hello,
    i hope i am in the right directory for my question!
    Under Leopard Server I set up an DNS Server wich works quite good so far...
    When i try to set up the Home-directory for an new user the networkpath is always wrong.
    My normal server adress is : "hale.school.private" the Usergroupmannager always set "afp://hale.private/user"!
    Where can i change this?

    _*Here an Copy of my changeip command:_*
    +hale:~ Administrator$ sudo changeip -checkhostname+
    Password:
    +Primary address = 192.168.2.107+
    +Current HostName = hale.school.private+
    +DNS HostName = hale.school.private+
    +The names match. There is nothing to change.+
    _*And here theproblem in the Workgroupmanager:*_
    Message was edited by: sykane

  • Filevault Encryption for Moved Home Directory and External Hard Drive

    This posting consists of two different, yet associated, questions.
    Here is my relevant equipment:
    MacBook Pro
    Micronet Platinum RAID Pro, 2.5 terabytes (uses: video editing, backup)
    LaCie Rugged All-Terrain Hard Disk, 160 gigabytes (use: additional storage for MacBook)
    *Question 1:*
    I currently use FileVault to encrypt my Home directory on my MacBook Pro. However, I am running out of hard drive space, given that I do a lot of work with film and have a lot of large applications such as Final Cut Studio 2 and Creative Suite 3 Master Collection fully installed and taking up a lot of space.
    Hence, I need to move my Home directory to an external hard drive to free up a nice amount of space, and I would like to keep the applications on the Macintosh hard drive to ensure that they run optimally (though the Lacie drive does use FireWire 800, so perhaps it would not matter?). +Leaving my Home directory unencrypted is not an option.+
    Question: If I use the Advanced Options for my Account within Mac OS X 10.5 Leopard (Apple menu > System Preferences > Accounts > (right click) Advanced Options...) to change the location of my Home directory to the Lacie external hard drive, will FileVault still encrypt my Home directory at this new location?
    *Question 2*
    In the past, FileVault would not encrypt data on external hard drives—only data within a Home directory.
    Of course, I understand that there are many ways to eschew this limitation of FileVault (e.g., create a secure image with Disk Utility, use third-party software, et cetera). Still, it would be nice to have this functionality built right into the Mac OS as part of FileVault, for ease, reliability, and so on.
    Question: With Mac OS X 10.5 Leopard, is there now any way to use FileVault to encrypt files other than those within the Home directory? That is, any files that I drop into the Lacie hard drive (for simplicity, let’s assume outside of the Home directory option I asked about above in the first question) would be encrypted by FileVault.
    Thanks.

    More information.
    Home Folder - Move

  • Accidentally changed the path of the home directory and now I can not get access my profile.

    before the way was /valumes/macintosh hd/igor but then i decided  to remove a space between macintosh and HD then I restarted my mac and after reloading I can not get access my profile. Thanks for the helping.

    Boot up holding command-r keys into your Recovery Volume and re-install OS X on the volume.
    This will be an install "in place" and shouldn't effect any of your own data or settings.

  • Is there a file in which OSX stores the home directory path, where to find it and how to edit it in Windows 7?

    Hi everyone,
    I have a SSD with the System and Apps on it, and another HDD containing the home directory.
    I made the mistake to rename the Volume the home directory is on whilst being logged in, the system reacted accordingly and prompted some Password requests,
    and I then tried to choose the newly named Volume in the Advanced options dialogue in Users & Groups (example seen below).
    I tried to change the name back to what it was in the hope of it all being back to normal again, but instead it's completely messed up now and I cannot login anymore (prompt: "You are unable to log in to the user account "xxxx" at this time. Logging in to the account failed because an error occurred")
    All I can do now is boot my Windows 7 and try to fix this from there, I can read/write the OSX Volumes thanks to MacDrive.
    So now the big question is:
    IS THERE A FILE containing the path to the home directory (red arrow)?
    IF SO, WHERE can I find it?
    And is there a way to edit it in Windows?
    My guess is that if I rename the Volume, AND change this path to something identical again, it might solve the issue.
    Thanks!

    Download THIS
     Cheers, Tom

  • Use another partition for Home directory?

    I upgraded my Power Mac G5 to Leopard and it recognized that I use a separate partition for my home directory. My MacBook didn't have enough space on my system partition to upgrade, so I did a clean install. Now I'm stuck using a home directory on the system partition- NetInfo manager does not exist in Leopard to allow this change and I want to use another partition for my home directory. How do I change this?

    Use the 'ln -s' command in the Terminal, which is in the /Applications/Utilities/ folder, to create a symbolic link to the desired location of your home folder, and put it where your current home folder is. The l in the command is a lowercase L; to see instructions for it, run 'man ls'.
    (25389)

  • Getting the current Home directory in PackageMaker

    Hi all,
    My package works fine to install a folder in /Library and then set two keys in Loginwindow's defaults file. Even internet-enabled disk image works great.
    My problem is, and I've tried now for 2 days to read everything on this, is that I want my install to place an "uninstaller" script on the user's Desktop so the user can easily reverse what the installer did (remove 2 keys and remove the folder in /Library). No problem, this script works fine when run by itself.
    But I can't figure out for the life of me how to specify to PackageMaker "home directory of the current user/Desktop" as the install location of this "uninstaller" file. I tried "~/Desktop" and "$HOME/Desktop" in the PackageMaker "destination" field, and also tried making a hierarchy of "~" and "Desktop" folders, and also tried setting the destination to "." and blank. All of these resulted in the Installer making a new directory called "~" at the root of the volume, or one named "$HOME", or just placing the script on the root of the volume. I want it on the user's Desktop, so they will see it. (NOTE: when trying these Unix terms, I was making a separate .pkg for the uninstaller; I know you can't have 2 different install locations in the same package.)
    Is this (getting the path to the user's Desktop) possible with PackageMaker, or do I have to have my "postinstall" script for the main install literally create the uninstall script at the user's Desktop (because the "~" notation should be recognized in a shell script)?
    I can't figure out why PackageMaker does not recognize the "~" as being the user's home directory - it uses "/" and ".." as defaults sometimes, so it is using the Unix notation.
    Also, since the uninstall script is a shell script, if the user double-clicks it, it opens Terminal, which is un-elegant to say the least. Is there a flag that can be set in a shell script which tells it NOT to open Terminal, just to run? I know this is what happens if I wrap it in AppleScript, but I hate using kludges like that.
    Thanks in advance to anyone who can help! Happy Holidays
    Johnny
    Dual 2.0 rev A G5   Mac OS X (10.4.3)  

    I have a tech support incident ongoing with ADC about this. People are away for the holidays, but so far I have been able to confirm that PackageMaker itself can't do this, as the name of the current user isn't available, nor do paths to the current Home directory work.
    The only way is to have PackageMaker launch a preinstall shell or Applescript that does the "mv <item1> <item2>" or similar (the argument $1 that gets passed to these preinstall scripts IS the name of the user doing the install, so you can get the path to his home directory).
    The problem THEN becomes, PackageMaker will not build a package that contains only scripts - it HAS to have some "payload" or you will get a build error. So the ultimate kludge would be to have it run the preinstall script, give it a bogus payload (empty file, etc) to install in e.g., /Library or /Applications, then have the postinstall script delete that bogus payload. I have not tried this so I do not know if it would work.
    I am thinking now, with the extremely confusing and apparently contradictory rules that PackageMaker has, that the best way to install software is just to wrap a shell script in an Applescript Application Bundle wrapper (because you can't double-click a shell script without launching Terminal, so to have the user run a shell script you need to wrap it in Automator or AppleScript or a Cocoa app wrapper) and have the shell script do the copying of the files that you need. This still might result in the shell script trying to get some sort of permission (either sudo or that "Override user/group for xxx?" message).
    I have read the rules on permissions for Packages about 1,017 times and they still make absolutely no sense to me, and I understand Unix permissions completely. All they would have to do is give some examples, but they don't.

  • Re: Lion Update 10.7.2 Home Directory on another volume

    Hi all,
    Fought this for a few days.
    Machine MacMini 2007 with 500GB Hard drive installed.
    On OS X 10.6.x and OS X 10.7.1.x I had moved my home directory to another volume, as my Home directory was initially as big, and is now bigger than my boot drive.  Installed 10.7.2 upgrade and after macine rebooted told me it could not find my home directory. 
    1.  External volumes were not showing on left panel of Finder or on desktop as was in previous version.
          Problem:  Obviously 10.7.2  did not preserve previous preferences and machine setup.  Did not see that notice in release notes.
          Solution:  went into finder preferences and selected options to set those. 
    2.  Ran Applications/Utilities/DiskUtility on all Volumes. 
         Solution:  some drives had some errors, but everything repaired just fine.
    3.  Opened Terminal and checked external volume with my home directory on it /Volumes/Users/<HomeDirectoryName>, all files seemed to be there and intact
    4.  Opened Settings/Users & Accounts, right clicked on login, Home directory was set to the correct location.
    5.  In Terminal performed the following steps, and verified directories:
             >cd /
             >ls -la
             > cd Volumes
             > ls -la
             > cd Users
             >ls -la
           Directory showed Login Name symbolically linked to location on external drive
            Problem:   No home directory files (i.e. Documents, Pictures, Movies were all empty)  Dock showed up as if new install, no preferences remembered
    6.  Called Apple support line, finally got senior technician on line, and had to argue a bit with the technician that I wanted to have my Home Directory on another volume.  After we settled on that fact, and review of previous steps, he had me change the Home directory setting which we did several times.  After changing /Volume/Users/<LoginName> a couple of times and getting Users1 and Users2 directories created he convinced me that the problem was using /Volumes/Users/ anything for my external volume.  We then created a new partition by splitting the drive, and I proceeded to copy to a new partition called MyUsers.  Left apple support while approximately 700 GB were copied to new partition.
    7.  Let computer cook until next morning.  Tried setting home directory in Users Accounts/Login/Advanced to /Volumes/MyUser/<LoginName> still no joy!
    8.  Took Shower -- always get best ideas in shower!  went back re-read MacWorld Articales on moving Home directory, and TUAW article.
    9.  Determined the problem.
    10. Problem:  OSX 10.7.2 creates a new home directory on the boot drive, even if you symbolically link to another one.  Thus the Users1 and Users2 directories on the boot drive root directory.  Settings/User Accounts/<login>/Advanced does not do this properly
          Solution:  Delete the boot drive login directory, no matter what it points to and symbolically link to external directory.
              Open Terminal Session:
                 >cd /
                 >sudo rm -rf <LoginName>
                 >sudo ln -s /Volumes/<VolumeName>/<LoginName> <LoginNme>
                Restart computer
                Note:  VolumeName =Users works just fine.
    If Engineering will check to see if an existing directory exists for the Home directory and set it up, then the problem would not have happened.
    Hope this helps Engineering and others with this problem.

    I tried something a bit different that worked (so far). I always have a second Admin account that has its home directory still on the main Mac HD. I logged into that account and opened system prefs. Then I found my account and right clicked on it to get the "Advanced options." I reset the account's home folder (which said it was on the external drive) to the internal Mac HD.
    Logged out of Admin account and back into my account, which showed as a new user account. Logged out and back in as Admin, then back to system prefs and "Advanced options" for my real account. Changed the path to my home folder on the external drive. Logged out of Admin, back to my account and it was fixed.
    Hope this helps anyone having the same problem.

  • How can I use a relative path in a Virtual Directory tag?

    That is probably a bit vague, so I will explain in more detail. We are using BEA
    WL Portal 7.0 and our team is developing multiple portal applications. We have
    a core set of portlets (consist of JSPs) that we need to reuse in multiple portals
    (Web Apps), however from a version control perspective they need to reside in
    one common location. So, the solution I came up with is to use a virtual directory
    for the the common directory and add this to weblogic.xml for each web app. This
    works fine. However, each developer has different directory names for their project...ClearCase
    view names to be specific... plus we have integration views, QA views, etc...
    so we can't have any "C:\mystuff\mydomain" absolute paths anywhere in the portal
    configuration. Does anyone know of a way to use a relative path for a virtual
    directory? I have tried various versions of ../../ for example to try to backup
    and then recurse down to the directory, but this is not working. Any ideas?
    By the way this is basially just a hack for development, when we package the WAR
    for QA, Prod, etc... we copy needed files and there are no virtual directories.
    In other words, I don't care how "creative" solution is :)
    This is what I have right now, which I need to replace with a relative directory
    name:
    <virtual-directory-mapping>
    <local-path>C:/Projects/TouchPoint_v1.0_Fix/tp_portal/bipiportals/beaApps/portalApp/tp-shared</local-path>
    <url-pattern>*</url-pattern>
    </virtual-directory-mapping>

    Well, in fact you can in a special case :
    - The file you want to access is in the same directory than the applet (or in a sub-directory)
    If this condition is OK, you can open the file using :
    java.io.InputStream MyInputStream = <YourAppletClassName>.class.getResourceAsStream("sidira_interactif2.svg")
    With this stream, its easy to read the file content.

  • Home directory is read only

    Hi -
    I'm having a strange problem with my home directory on my MacBook Pro that is running Leopard.
    The finder window for my home directory claims it is read only (the pencil with a line through it shows up). However, if I do a Get Info on it, it says I have read/write permissions. All the directories inside my home directory are fine. If I go into terminal and change the permissions, I still can't write to it:
    Tims-MacBookPro:Users Tim$ ls -l
    total 0
    drwxrwxrwt 4 root wheel 136 Sep 15 2008 Shared
    drwxrwx---+ 46 Tim Tim 1564 Jul 4 16:26 Tim
    Tims-MacBookPro:Users Tim$
    Tims-MacBookPro:Users Tim$ cd Tim
    Tims-MacBookPro:~ Tim$ mkdir test
    mkdir: test: Permission denied
    Tims-MacBookPro:~ Tim$
    From the snippet above, clearly I have r/w access, yet I can't create a directory!
    Any ideas what could be wrong?
    Thanks.

    Actually you do not have read/write access. Your Home folder is owned by the system user and the group is wheel. The correct values for a Home folder are:
    Owner=you with r/w privileges
    Group=staff with r/w or read-only privileges
    Everyone=read-only privileges
    Try this:
    you can reset the ACLs on your home folder by the following series of terminal commands. It's up to you if you want to do that. I personally like them but I hate the way the ACLs are implemented in leopard so that many ACLs are invisible from GUI and yet can be propagated by using "apply to enclosed items" button. That's a major No-No in my book.
    Here are the commands (in bold). just copy and paste the commands (they are in bold).
    *chmod -R -N ~*
    this removes all ACLs from files in the home directory.
    The following two commands put the necessary ACLs back where they belong.
    *chmod +a "everyone deny delete" ~/ ~/Desktop ~/Documents ~/Downloads ~/Library ~/Movies ~/Music ~/Pictures ~/Public ~/Sites*
    *chmod +a "`id -un` allow list,addfile,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr, writeextattr,readsecurity,writesecurity,chown,file_inherit,directoryinherit" ~/Public/Drop\ Box*
    The above was provided by user V.K. in this forum discussion.

  • ACL - how to (easily) deny access to everthing but home directory

    I was trying to set up a very restrictive drop box for users to leave and take files from. I set up a special USER and then thought I could use the ACL's to deny access to the system except for the home directory. From reading the documentation I tried the following
    1) at the root level I denied read/write access for USER
    2) at the home directory I allowed read/write access for USER
    and then I tried to 'remove inherited' ACLs. I can't seem to get this to work. USER is always denied. Any help appreciated

    Never mind. I figured out how to do this from the command line using chmod +a to do multiple directories at once. I still don't know why the top level ACL wouldn't propagate to the lower directories but once I did this on the /* directories everything was fine.

  • Chmod -R 700 on home directory doesn't restrict other users

    Hi All,
    I have several users sharing a mac. I wanted to secure my home directory so I opened a terminal and typed:
    cd /users
    chmod -R 700 alandye
    a ls -l confirmed permissions recursively changed for my home directory and subsidiary directories and files had been set to og-rwx.
    Then, I logged in as a different user (tknoble) , and tried to access the directory (alandye)through the finder that I had just restricted permissions on, and viola, I could read any file in there.
    This doesn't happen on Unix or Linux, why is it happening here? I tried restricting account tknoble to non-administrative, but got the same problem.
    Net/net, finder seems to be ignoring the posix file permissions.
    Can anyone explain why this is happening?
    thanks,
    Alan

    ... Still, the ACL issue and the open default permissions including the default umask on the Mac has me perplexed. I've used ACL's for years as a system manager on mainframes and other secure enterprise unix platforms, generally through a central administrative console like RACF or ACF2 on the mainframe. It identifies all ACL's on the system and allows you to administer them centrally. The idea that my mac has system generated ACL's that are only accessible through chmod on a file by file basis and are inherently set with open permissions seems like a bad security setup.
    First, the default permissions and umask values have been typical of Unix systems since I started using them back in '85. And even in the Family situation, allowing family members the ability to share information is not uncommon, and can be frustrating to the family if everything is totally locked up.
    Plus your complaints about ACLs, it just a side issue, as the /User/username folder should have only had an ACL that prevented accidental deletion. Your real problem was cached Finder information. So this ACL discussion is just a tangential issue.
    Second, a Mac is a mass market consumer personal computer, with a strong leaning towards 1 person being the owner and user of that computer. It is not typically sold as a Mainframe replacement. Having tightly locked down, no access default permissions and umask just makes life extremely difficult for the mass market consumer.
    Applying Mainframe rules to a Mac is only going to frustrate you.
    As for having an ACL admin tool besides chmod, for the most part consumers are not aware of ACLs, they are used sparingly on the Mac, and as such it is not something Apple has felt a need to invest in. Maybe there is a 3rd party utility that will provide this service for you.
    While investigating this I did discover a similar problem with a RAID array I have attached with similar file permission problems. chmod -R 700 on directories does set the permission bits correctly, but again, finder bypasses them and allows access for other users, even after a reboot. Apparently, according to this http://hints.macworld.com/article.php?story=20020418091450891 the externally attached drives ignore ownership by default.
    Again, the Mac is a mass market consumer item. Just about every external drive on a Mac is a detachable device, which can be moved around to other Macs, etc... (especially USB thumb drives, SD cards, etc...). Having these devices default to strict security would again frustrate the mass consumer Mac user, when all they want to do is get their pictures off of the SD card, or move files between 2 computers, etc...
    My point is that the defaults Apple has selected are targeted to the mass consumer Mac user. Not the data center mainframe user.
    I would encourage you to give Apple feedback on your experiences
    <http://www.apple.com/feedback/macosx.html>
    or
    BugReporter
    <http://bugreporter.apple.com>
    Free ADC (Apple Developer Connection) account needed for BugReporter.
    Anyone can get a free account at:
    <http://developer.apple.com/programs/register/>

  • How to change users home directory home folder name?

    Is there a way in Mountain Lion to simply change the name of the home directory home folder name without it throwing off anything else for that particular user?
    I read the article about 'Enabling and using the "root" user', but it specifically says for 'Lion' and not 'Mountain Lion'
    When I get to step 8 there is no clear place to enter an adminstator account name and password so I can't go any further.
    I also did a quick test with a newly created user and after setting some preferences and customizing the desktop, I changed the home directory name and I pretty much lost all my preferences after logging back in. It's as if changing the home directory name in any way shape or form literally wipes out the previous user and you have to start anew.
    I don't want to risk changing the home directory name and end up losing essentially my whole user setup, but I really want a different name for my home directory and I don't want anything else to change. Is this possible?
    Thanks

    Hi Blastic,
    I'm trying to do the same thing.  I did follow Apple's instructions and while they are easy to follow.....I was unable to rename the folder as described  (clicking on it or pressing enter).  I did enable root user, I did log out and re-log in as root user.....and I got stopped.  I simply could not rename the folder as per Apple's instructions and ther is NOTHING on the internet about it......save for your beacon of light!  Thanks for the post.  I'm using 13 inch MacBookPro Mid 2010 2.4 GHz, Intel Core 2 Duo, 8GB ram, OS 10.8

  • Safari and Server Admin slow to launch on a Network Home Directory

    I have an issue with Safari and Server Admin that started two days ago. When you attempt to launch Safari or Server Admin while logged into a Network Home Directory on an Intel Mac it will bounce about 10 times, stop bouncing, and then about a minute later launch and act normal. If you quit and reopen Safari you have to wait again. Server Admin exhibits similar behavior, although the delay is longer and there are long pauses while using the program. The network home folder is on an afp share on an Intel XServe w/ 10.5.5 and 4gb of ram.
    Troubleshooting steps already done:
    1. Same intel mac with a local user, Safari and Server Admin launches normally.
    2. Same intel mac with a portable home directory user, Safari and Server Admin launches normally.
    3. Same intel mac with a different network home directory user, Safari and Server Admin have the long delay.
    4. Different intel mac with a network home directory user, Safari and Server Admin have the long delay.
    5. Different intel mac with a local user, Safari and Server Admin launches normally.
    6. Different intel mac with a portable home directory user, Safari and Server Admin launches normally.
    7. PPC mac with same network home directory user, Safari and Server Admin launches normally.
    8. Checked forward and reverse DNS lookups for the home directory servers.
    9. Checked entire DNS zone for forward and reverse lookups.
    10. These exact same symptoms began occurring the same day at another site I manage with a separate DNS and Open Directory structure in another city.
    11. All other programs appear to behave normally as far as I've been able to tell.
    I have the feeling that something strange is going on with DNS and Server Admin and Safari are trying to resolve something, time out, then try to act normally. I don't know why it would just affect intel macs. In addition, there were no setting changes or DNS alterations that happened that I am aware of. These symptoms are also happening at another site that I manage with a completely separate DNS and Open Directory structure. I'm puzzled, any help would be appreciated.

    Upgraded to 10.5.6 and the issue disappeared. I don't know what what wrong, but I think it was DNS related...

Maybe you are looking for

  • Two step stock transfer process

    hi All, i want to transfer material XYZ from plant AA to plant BB  in 2 step stock transfer. Qt= 2000 So first i am trying to remove stock from plant AA in 303 movement type. system throughing error message " Deficit of PL Stock in transfer 48000 PC:

  • What is the basic use of Interface Tables

    Hi there, We are trying to connect and send data to the EBS Oracle System. We are facing different scenarios and I don't know which one to use in which scenario? So if I add a vendor for instance, should I use the Interface tables or call a stored pr

  • Preview/Crop Updates in Grid view

    Due to the performance hit, I have the auto update XMP feature turned off. I recently imported a batch of 400+ photos and made changes to white balance, cropping and other settings. The images are DNG files. Every time I switch back to the folder con

  • Campos seleccionados al hacer busquedas.

    Buenos dias expertos,                                     Al hacer una busqueda desde cero en el maestro de articulos, el sistema busca en forma normal. Si hago una segunda busqueda sin reabrir el maestro (encima de la busqueda anterior), el sistema

  • Applying RGB values to a Colour Mask. Is this doable?

    Hello FCPX wizards. I could use a little advice. I shot some garments on a white background. One of the garments was a pinkish/magenta color. It is fire engine red in the footage. Everything else is fine. Just the pink garment is off. I created a col