Include using jsp:include for a file from the docroot directory.

Hello,
I try to include one file from the doocroot but only can import files from the context (War deployed).
when I put
<jsp:include page="/foo.htm">
to include this file: http://www.mydomain.com/foo.html
it try to show this file: http://www.mydomain.com/mycontext/foo.html
it puts ever the context before the name of my file.
How can I include this file.
Thanks
PD: obviously 'foo.html' is in the doocroot.

From within a JSP you have a reference to a PageContext called pageContext. This has a method getServletContext(). From the ServletContext you can find the real path the servlet lives in. So...
File basePath = new File(pageContext.getServletContext().getRealPath("/"));Now basePath contains your path $Catalina/webapps/webservices. Then it's just a matter of working relative to that, e.g.:
File usersFile = new File(basePath, "users.txt");

Similar Messages

  • I previously had PS CS5 Trial installed but removed it using both Control Panel Programs and deleting all files from the CS5 directory on Program Files.  I then installed a purchased product from Adobe disc using the serial number on the case.  But when I

    I previously had PS CS5 Trial installed but removed it using both Control Panel Programs and deleting all files from the CS5 directory on Program Files.  I then installed a purchased product from Adobe disc using the serial number on the case.  But when I try to launch it, I get a screen headed Photoshop CS5 Extended Trial.  It asks for the serial number and says that my trial has expired.  It rejects the serial number from the Adobe case saying "This Serial Number is not valid for this product".  It thinks that I still have the expired Trial Version installed.  How do I convince it (the program) that the Trial Version is long gone and the currently installed product was installed with a valid and accepted serial number????

    Let me know how it goes. Go into your Adobe account and register your serial number asap.
    https://www.adobe.com/account/my-products-services.html
    That way, should you lose it or you need support, it is on record that it's yours and you can fetch your s/n it from anywhere.
    There are too may sad stories here, where people forgot and the box is buried or lost.
    Gene

  • When will there be an update for RAW files from the new Olympus OM-D E-M10 for Lightroom 4?

    Hello there,
    when will there be an update for Lightroom 4 which provides the option to import RAW-files from the Olympus OM-D E-M10 directly into LR4?

    Lightroom 5.0 came out in June 2013 with a public beta for LR5 available at Adobe Labs back in April 2013.  It seems you may have been unlucky purchasing the old version just before the new version came out, or perhaps LR5 required a minimum OS level your computer didn’t have.
    Purchasing a new version every year isn’t necessary, but you do have to buy a new version whenever you buy an unsupported camera.
    Adobe employees need to get paid just like the rest of us, and their releasing a new payfor version every so often is how they get paid. 
    Never mind that the new version has improvements beyond new camera support, so there was a full development-release-training-marketing effort behind it.
    The upgrade price is cheaper than the full purchase price and if you want Photoshop capabilities, there is a LR+PS Photographer’s Bundle that is half the price of purchasing Photoshop, itself: 
    http://www.adobe.com/products/photoshop-lightroom.html

  • I want to Pick the Single file from The source Directory

    Hi,
       My Scenario is File to RFC .. I'm getting the files in the source Directory.. File names  are  SENDER_(TIMESTAP).XML .. but the problem is... When ever  Files  are available in the Source Directory  Immediately  XI was picking  all the files at a time.. But I want to   to Pick a single file at a time..
    for Making  this what we have to do..   After Processing the first file then only my Sender adapter should pick the next file...  (even though Multiple files are available in my Source Directory)
    Regards
    Jain

    Hi,
    the other option was use Adapter specific attributes in the Sender Communication channel..
    or
    while droping the files ask them to drop using time stamp in another directory  and an external validation is required .. and after validation push single file to Source directory using batch file..
    i.e use a batch file using run time operating system or make that batch file to run at OS level ..
    where the batch files needs to validate the time interval of the file and needs to push a single file to the source directory.. where from there we can directly pick a single file and process..
    regards,
    Kishore

  • Reading files from the parent directory

    Hi all, I'm just wondering if files can be read from the parent directory.
    I've created a package and realise that for one function it needs to read from a file which was created in the parent directory. I've tried:
    BufferedReader inPut =
    new BufferedReader(new FileReader("../file.txt"))
    but it's still saying that it can't find the file.
    Any ideas if I can read that file?
    Thanks

    How about using the getParent() or getParentFile from the File class?

  • Want To Pick a single file from the Source Directory

    Hi,
       My Scenario is File to Proxy. Legacy team is generating Bunch of files in a same directory.But i  want to pick single file for each poll interval. after process teh firts file only Sender Adapter should pick and process the next file .
    At prsent  , My scenario is picking all the files  in a single shot and all the files are processing parellelly. . But all the files are related to one Process Order So, out of bunch of files some few of files are processing successfullu. remaining all teh files are getting  " Proces Order is locked by another User" Error message . This was happeing only for the parellel processing.  And from technical point of view , In sender Communication Channel i have used  Quality of Service  is Exactly Once in Order  and i have mentioned the Queue name also. .
    Evel legacy team is generating Bulk of files i want to pick a single file only, suppose if theer is no chnace then at least i want to process single file at a time  after finishing the one file processing , then only i want to go for the next file
    For this, is teher any paremeters need to be set , please suggest me,.
    Regards
    Jain

    At prsent , My scenario is picking all the files in a single shot and all the files are processing parellelly.
    Are you using the Additional Source Files options?
    What you can do :
    1) Select Processing Tab > Processing Sequence> By Date
    2) You can introduce a delay between two processing by using a Thread.sleep(msec) statement in some UDF in your mapping...this will ensure some delay between two processing: Re: Delay in MM possible ?
    3) You can select the Connect Mode option as Per File Transfer.....keep it as the last option....
    Regards,
    Abhishek.

  • Does anyone know how to load a file from the source directory?

    I have a Photoshop panel  that uses the Texturizer function. I would like to use the images in the src images directory of the  project. I need to reference the /src/images directory of the panel when the project is running.
    Does anyone know how to access the source directory using action script?
    I have tried a number of options but only seems to work if I hard code a location
    public static function Mat02(): void
    // Works
    var myTexture:File = new File("C:\\Users\\Ed\\Adobe Flash Builder 4.6\\LayoutBuilderSuite\\src\\images\\mat 02.psd");
    // Tried - no luck
    //          var file = File.applicationStorageDirectory.resolvePath("mat 02.psd");
    //          var file:File = File.applicationDirectory.resolvePath("mat 02.psd");
    //var file:File = File.applicationStorageDirectory;
    //file = file.resolvePath("mat 02.psd");
    //var myTexture:File = File.applicationDirectory.resolvePath("mat 02.psd");
    //var myTexture:File = File.documentsDirectory.resolvePath("mat 02.psd");
              var desc5:ActionDescriptor = new ActionDescriptor();
              desc5.putEnumerated( app.charIDToTypeID( "GEfk" ), app.charIDToTypeID( "GEft" ), app.charIDToTypeID( "Txtz" ) );
              desc5.putPath( app.charIDToTypeID( "TxtT" ),   myTexture  );
              desc5.putInteger( app.charIDToTypeID( "Scln" ), 150 );
              desc5.putInteger( app.charIDToTypeID( "Rlf " ), 4 );
              desc5.putEnumerated( app.charIDToTypeID( "LghD" ), app.charIDToTypeID( "LghD" ), app.charIDToTypeID( "LDBR" ) );
              desc5.putBoolean( app.charIDToTypeID( "InvT" ), false );
              app.executeAction( app.charIDToTypeID( "GEfc" ), desc5, DialogModes.NO );
    Thanks

    I haven't seen too many questions like this on this forum.  Did you also try the photoshop forums?

  • How do I delete a Pages file from the Users directory?

    Browsing my new MacBook I've spotted that a version of one of my earliest Pages docs is stored directly in the Users directory. There is no option in Finder to delete it. I can drag a copy elsewhere, but I want to get rid of it completely. How do I achieve this?
    Thanks.

    Hi Andrew,
    You need to go to your Users Library...
    users/yourname/library/application support/iwork/pages/templates/my templates
    If using Lion... in Finder, hold down the Option key while clicking on the Go menu and your users Library will appear...

  • When will Aperture have support for RAF files from the new Fuji XPro-1?

    How long does it normally take to get the RAW file format updated? Fuji say they sent the file details to Apple many weeks ago. This is a camera being given fantastic reviews in all professional magazines worldwide - but I'm stuck with an Aperture folder full of "unsupported image format" files.
    Really annoying as I use the full suite of Nik plug-ins so I can't do anything with these files until Aperture is updated.

    Per an interview with a spokeswoman from Fuji, they have indeed provided Apple (and Adobe as well) all the needed technical information in order to support the RAW files (i.e. algorithmic information created by Fuji for the non-standar filter array, etc etc). Please don't spread any more misinformation about it, it's already been flamed to death on all the online camera forums. You can still choose to 'blame' whomever you wish about why it's still not supported by Apple, but you can no longer reasonably assert that Fuji hasn't done their part by providing them what they need. Nondisclosure agreements were signed as well.
    Having said that, I find it ridiculous at this point that it's not supported, for several reasons, some being the seemingly similar Fuji users who also use Aperture as well as the opportunity here for Apple to take some market from Adobe (who as of yet are not producing very great output files for Fuji X-trans). Apple was/has been at a disadvantage to Adobe for a long while now, and being an outsider, I presumed Apple would want to take advantage of this (and any similar) opportunity to grab some share from Adobe. I was well wrong, and it seems that other lesser-known-used companies are now doing just that.
    Well good on them. I for one will be looking at any/all (new)comers and will certainly be going with the best of those. Sorry Apple, you lost another one. There was a real competition, for me, btwn Aperture and LR4 up till this point. You'd have to pull a rabbit out of your hat to keep my Aperture biz.

  • Does anybody know if and when there will be a plug in for raw files from the Nikon D810? I have lightroom 4

    I am considering buying a Nikon D810 but I do not want to be waiting for ages for a plug in for it's RAW files on my Lightroom 4. Does anybody know if and when there will be a plug in? I presume the 8.5 plug in will not cover the cameras Raw file.

    There is no plug-in for Lightroom 4 that would ever give you support for the new camera. Lightroom does not use Camera Raw. Camera Raw is a plug-in for Photoshop and Photoshop Elements. If you want support for your camera in Lightroom you will need to upgrade to Lightroom 5, and then wait for the 5.6 update which should be available within next few weeks (unless Lightroom 6 is introduced). In the meantime you can use the DNG converter (version 8.6 RC) to create DNG copies of your raw images that you would be able to open in Lightroom 4.

  • I am using logic to record a podcast and using soundboard to use as a playback for music and sound effects.  I'd like to soft patch sound board into logic, and still use my interface for recording audio from the other members of the podcast.

    I am using logic to record a podcast.  I have a presonus firestudio mobile for my interface so I can record several people at the same time.  I'm also using Soundboard for a playback system for music and sound effects.  I'd like to know how to soft patch Soundboard into Logic while still using the Firestudio interface to record the other members of the podcast.  Does anyone know how to do this? and if so can you tell me how to do it?  Thanks.

    Thanks. Now, since Apple failed to provide an audio in jack for their new and improved iMacs (mine has one), all I can suggest is that you contact AppleCare, since you have 90-dqy free phone support. If need be, you might reconsider your purchase, but that's for you to decide.

  • PI is not able to pick the file from the FTP folder

    This is the FILE TO IDOC scenario. We have configured the file adapter. But its not able to pick the file from the specified directory. We have tried changing the transfer mode from Binary to Txt & also we have tried to put advance selection for source file but it didn't work. Its throwing the below error:
    PI Adapter Log:
    An error occurred while connecting to the FTP server '10.130.150.21:8529'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 451 Unexpected reply coderequested action aborted: local error in processing'. For details, contact your FTP server vendor.
    Also we have contacted the FTP team & they told that PI is sending an unsupported command. So instead of taking the file TLOG.txt, its treating this file name a s a directory. Please find the logs from FTP end below:
    FTP Log:
    (207197)2/5/2013 14:48:25 PM - sysisappi (63.130.82.16)> 230 Logged on
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)> FEAT
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)> 211-Features:
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)>  MDTM
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)>  REST STREAM
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)>  SIZE
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)>  MLST type*;size*;modify*;
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)>  MLSD
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)>  AUTH SSL
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)>  AUTH TLS
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)>  PROT
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)>  PBSZ
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)>  UTF8
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)>  CLNT
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)>  MFMT
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)> 211 End
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)> PBSZ 0
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)> 200 PBSZ=0
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)> PROT P
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)> 200 Protection level set to P
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)> CWD /Qas
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)> 250 CWD successful. "/Qas" is current directory.
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)> CWD SAP_ORION
    (207197)2/5/2013 14:48:26 PM - sysisappi (63.130.82.16)> 250 CWD successful. "/Qas/SAP_ORION" is current directory.
    (207197)2/5/2013 14:48:27 PM - sysisappi (63.130.82.16)> CWD Inbound
    (207197)2/5/2013 14:48:27 PM - sysisappi (63.130.82.16)> 250 CWD successful. "/Qas/SAP_ORION/Inbound" is current directory.
    (207197)2/5/2013 14:48:27 PM - sysisappi (63.130.82.16)> CWD IRIIN04
    (207197)2/5/2013 14:48:27 PM - sysisappi (63.130.82.16)> 250 CWD successful. "/Qas/SAP_ORION/Inbound/IRIIN04" is current directory.
    (207197)2/5/2013 14:48:27 PM - sysisappi (63.130.82.16)> CWD TLOG.txt
    (207197)2/5/2013 14:48:27 PM - sysisappi (63.130.82.16)> 550 CWD failed. "/Qas/SAP_ORION/Inbound/IRIIN04/TLOG.txt": directory not found.
    (207197)2/5/2013 14:48:27 PM - sysisappi (63.130.82.16)> QUIT
    (207197)2/5/2013 14:48:27 PM - sysisappi (63.130.82.16)> 221 Goodbye
    It should list  *TLOG.txt*  but instead it is trying to get into a directory named  *TLOG.txt*.  same for other interface.
    So me & my team is struggling for last couple of days to fix this issue.Please share your suggestion

    Hi Sisir
    The screen shot of your config doesn't seem to correspond to the FTP log. I say this because the * is dropped from file name pattern "*TLOG.txt" (comparing your config and the FTP log). Can you share an updated FTP log?
    Sisir Das wrote:
    "/Qas/SAP_ORION/Inbound/IRIIN04" is current directory.
    (207197)2/5/2013 14:48:27 PM - sysisappi (63.130.82.16)> CWD TLOG.txt
    (207197)2/5/2013 14:48:27 PM - sysisappi (63.130.82.16)> 550 CWD failed. "/Qas/SAP_ORION/Inbound/IRIIN04/TLOG.txt": directory not found.
    (207197)2/5/2013 14:48:27 PM - sysisappi (63.130.82.16)> QUIT
    Also, like Rajesh suggested, have you tried to manually check permissions by logging in, traversing the directory, and getting the file?
    By the way, we always use backslash \ instead of forward slash in our configs. Not sure this would make any difference for you though. Also, I don't normally use a trailing \ at the end of the source directory path.

  • How do I access my back up files from the time machine if my computer was stolen?

    Hi, how do I access my back up files from the time machine if my mac book pro was stolen? I have a mac book air and mac too. But not sure how I can get back all the files from the stolen computer from my time capsule

    On the Mac Book Air or other Mac that you have, use Migration Assistant to transfer files from the Time Machine backups of the Mac that was taken.
    Macintosh HD > Applications > Utilities > Migration Assistant

  • File Adapter polls all the files from the directory when deployed again

    Hi,
    File Adapter polls all the files from the inbound directory irrespective of the timestamp when deployed again.
    For ex. when the BPEL process with file adapter is deployed, it starts polling the directory based on the timestamp as and when the directory is written with the files. I did not opt for deleting the files after read by the File Adapter.
    But, when BPEL process is modified and deployed again, this time, the file adapter picks up all the files in the inbound directory and doesn't consider the timestamp.
    My guess is that it should not pick all the files but based on timestamp only.
    I guess I can observe the same behavior if I bounce the Application Server also
    Do I have an option to achieve this?
    Thanks,
    Sasi Bhushan.

    try this:
    1- create a File object for the directory. (look at isDirectory() )
    2- create a File[] that represents the files in that directory. (.listFiles())
    3- if (file[x].isDirectory()) {recursive method call;}
    4- else {
    process file;
    If you want more help--do some work on it, and come back with specific questions relating to specific lines in your code and specific error messages you've been receiving.

  • Updates fail when McAfee VirusScan is installed ( Prevent Common Standard Protection ) Prevent programs from running from the Temp directory.

    When Access Protection is enabled under the category "Common Standard Protection", Rule: Prevent common programs from running files from the Temp Directory is enabled. the updates fail.
    This rule provides some protection against possible malware execution. However when this rule is enabled FireFox updates fail. We have set exclusions for "updater.exe" but the problem seems to be when FF restarts and the update fails. Is there anyway of finding out what is happening at that point?? as in what FF is doing? The old FF closes and it seems to spawn a fresh "firefox.exe". But the OLD version is still current.
    I would like to know if this update process can be identified and with the possibility of excluding what is being blocked so keep the extra security that this rule gives.
    When the rule is disabled, FF updates without issue.

    That's a comment in the file. It has no effect at all.

Maybe you are looking for