How to open a document out side the .war file

Hi all,
I have initially stored a document outside the WEB-INF in the .war file to retrieve it from a jsp file of the same war file. But now the file has been stored at a location on the same server and outside the .war file. how can I retrieve the file path and location outside the war file from the jsp. I ve previously used the following code when retrieving from a directory "docs" of the same .war file as:
                  <td  class="FormLableLeft"><a href="#" onClick=window.open("/docs/<%=colData.get("DOCUMENT_NAME")%>")><%=colData.get("File_NAME")%></a> </td>please suggest me how to retrieve the document located outside the war.

Create a servlet which reads the file from the local file system and writes it to the outputstream of the response after having set the response headers accordingly. Then simply call that servlet by URL along with the file ID as request parameter or pathinfo. You may find this example useful: [http://balusc.blogspot.com/2007/07/fileservlet.html].

Similar Messages

  • HT203433 I am having trouble moving my music to my new computer. I have enable homeshare. it does not show any files in my homeshare. How do i get them out of the normal files into home share

    I am having trouble moving my music to my new computer. I have enable homeshare. it does not show any files in my homeshare. How do i get them out of the normal files into home share

    Welcome to the Apple Community.
    The following article(s) may help you.
    Moving your iTunes library to a new computer

  • When I try to same an image under the command 'save as' it will only let me save as file types 'firefox document' or 'all files' and when I try to look at them later they dont work. How can I save an image as the same file type it is on the web site?!

    When I try to save an image under the command 'save as' it will only let me save as file types 'firefox document' or 'all files' and when I try to look at them later they dont work. How can I save an image as the same file type it is on the web site?!
    == This happened ==
    Every time Firefox opened
    == I updated to one of the firefox versions (Not sure which one it was)

    Thanks Alex, but sadly I already tried that. Neither .docx or .xlsx files show up in the content list. They both show as a Chrome HTML document so changing how Firefox addresses those doesn't help since it thinks its the same type of file. I don't think I can manually add files into the "Content Type" left side nav.

  • I updated my pages app on my ipad and when I tried to open a document it says the file format is invalid. None of my documents are opening pleaser help!

    I updated my pages app on my ipad and when I tried to open a document it says the file format is invalid. None of my documents are opening pleaser help!!!!

    Try this. It worked for me.
    I discovered the same problem.  I had an older version of Pages on my iPad. After updating it to the latest version all my previous documents created in pages for the iPad were rendered unreadable and a message stated that they were an invalid format.  Why for the life of me would a program that was created by Apple and sense updated not be able to read previous versions...well that's a whole other sad story.  Any way I discovered how to fix it but it would require that you had backup your iPad on a computer and not emptied your trash. If this sounds good than here is how you fix it... And it worked for me.
    These steps will enable you to reinstall a previous version of the Pages app so you can be able to read and edit older documents.
    FIRST: if you did backup your iPad using your computer and did not empty your trash, GOTO the trash and look for PAGES 1.4 (or other number) ipa ( that's the file extension) ie PAGES 1.4 ipa.
    SECOND: move that file out of the trash and onto your desktop.  Once you do this, double click on it and a box will come up stating a newer version has been found and do you want to revert back to older version. ANSWER YES. It will than automatically place and overwrite the older version back into the file on iTunes that contains the rest of your backed up apps.
    THIRD: and this is where it is important that your backup would have to have been on your computer. I'm not sure if backup on the cloud will work.  iCloud backup at your own risk And here's why. Before you restore you will need to remove the latest version of Pages off your iPad by doing the usual : holding down the home button until the apps wiggle and remove by pressing on X on app.  Removing off your iPad will also delete all your documents but if you have a previous backup on your computer those documents will be stored safely on itunes and will return.
    FORTH: plug your iPad into your computer and allow it to sync so iTunes will recognize it. Once iTunes is up and you can see that it recognizes your iPad, GOTO "FILE/DEVICES/RESTORE FROM BACKUP."  ******* DO NOT CLICK ON BACKUP***** click on RESTORE FROM BACKUP. This will reinstall all previous settings and documents that were their when you backuped PLUS the older version of Pages that you placed back from the above steps. Let it run through all the setups ( this could take up to 20 minutes...depending on amount of data and photos and apps).
    FIFTH: Once everything is reinstalled a message will popup on your computer stating "to leave iPad plugged in until iTunes recognizes it again" ( it's basically rebooting itself).  Once done (leave iPad plugged in still) GOTO iPad and follow the steps. IMPORTANT:  iPad will ask you if you want to SET IT UP AS A NEW IPAD, BACK UP FROM THE CLOUD or BACK UP FROM ITUNES.....press SET UP AS NEW IPAD. Follow all of the steps required. Once complete GOTO iTunes on computer, look for "IPAD" plus a little arrow ( should be on upper right corner of iTunes window, click on it ( this will safely disconnect your iPad from iTunes) . Now unplug iPad from computer and go to your iPad and look for the older version of Pages. It should be there along with all your old documents ( readable and editable too).
    Hope this helps. Good luck.

  • Hello! I just want to know how to open a document (.pdf or .doc).

    I have looked at Labview\vi.lib\platform\browser.llb\Open a Document on Disk.vi but the vi has many subvi's. It works well but when I  build a new application I always get errors when I try to open the document. Thank you.

    Altenbach....  we're gonna start calling you "Hawkeye" 
    There was not much info on the other post other than tst's reply..  I'll check it out..
    Thanks buddy!
    RayR
    EDIT PORTION:
    Humm...  the titles were similar....  "Hello! I just want to know how to open a document (.pdf or .doc) after the press of a control button. Thank you."
    But you're right.. nothing mentioned about a build..  >> SORRY: Not Duplicate Post <<
    Message Edited by JoeLabView on 09-21-2007 11:38 AM

  • HT4191 I have Notes that transferred to email when I set up a new email acct. They no longer appear in Notes. I can only access them in the email acct. How do I get them out of the email acct and back to the Notes app?

    I have Notes that transferred to an Email acct when I set up the acct. The Notes no longer appear in the Notes app only in the Email acct. How do I get them out of the Email acct and back to Notes? I stopped at an Apple store and they told me to copy them from the email back to Notes. But when I was in the email acct, I could not find a way to copy them. Shouldn't Notes remain in Notes unless I specifically send them somewhere else?

    Go into Settings > Mail, Contacts, Calendars, select that email account on the right-hand side of the screen and turn Notes 'on' for it - they should then appear in the Notes app instead of as an email folder in the Mail app (they will still be linked to that email account, so you may need to tap the 'Accounts' button at at the top left of the list of notes)

  • Hello; I am using Numbers '09 version 2.1 (436). I tried unsuccessfully to upgrade at one point. Now can't open existing documents. Message "The index.xml file is missing".

    Hello; I am using Numbers '09 version 2.1 (436). I tried unsuccessfully to upgrade at one point. Now can't open existing documents. Message "The index.xml file is missing". How can I correct this ?
    Thank you
    Tom

    I't not iWeb that got damaged but the domain file. The index.xml file is inside the domain.sites file that's located in your Users/Home/Library/Application Support/iWeb folder. Do you have a backup of that file you can revert to?  If so then do it.  Otherwise a long shot but try the following:
    close iWeb.
    delete the iWeb preference file, com.apple.iWeb.plist, that resides in your Home/Library/Preferences folder.
    go to your Home/Library/Caches/com.apple.iWeb folder and delete its contents.
    launch iWeb and try again.
    If that doesn't help continue with:
    move the domain file from your Home/Library/Application Support/iWeb folder to the Desktop.
    launch iWeb, create a new test site, save the new domain file and close iWeb.
    go to the your Home/Library/Application Support/iWeb folder and delete the new domain file.
    move your original domain file from the Desktop to the iWeb folder.
    launch iWeb and try again.
    OT

  • How to open iCloud documents with ios8

    hi,
    i recently updated my iPad to ios8. and when it asked me to install iCloud drive i said yes.
    Now when i open pages on my iPad, there are no documents.
    when i go to iCloud.com on my mac i can see those documents, so they still exist.
    how can i open my 'iCloud'  documents on pages on my iPad?
    most forums say i need to install the beta version of os yosemite, whom installation is not working those days.
    the only thing i can do was to open a document on iCloud.com on my mac and send it to me via email. from my iPad i could read that email and open the document in pages. But this work only with small documents, a document bigger than 20 Mo, cannot be sent via email ( i'm using gmail)
    please help me, i really need those documents, i'm working with them.
    thank you

    beckstarr wrote:
    Does anyone know how to open pages document with windows vista? i saved it onto a usb stick but when i tried to open it on the computers in my university which support windows vista, it didnt reconise the file and opened with a page of question marks!!!! Im panicking now!!!!!
    You cannot open it on Windows Vista. The only application in the world that opens a Pages document is Pages, and it is Mac OS X only.
    Your options:
    1. Find a Mac with Pages installed, and save the document as doc or pdf, which you can open on Vista.
    or, if that is impossible,
    2. Open the files in a texteditor like Notepad.exe on Windows and try to piece text fragments together to get at least part of your original text back. The images should also be available somewhere, even though all formatting is gone.

  • How to open my documents on windows 8?

    how to open my documents on windows 8
    pavilion p7-1234
    model:mxu23701n8
    This question was solved.
    View Solution.

    There are a couple ways you can do this, here's one:
    1. On the Windows 8 Start screen, move your mouse to the bottom left corner of the screen.
    2. Right-click in the corner, and a menu should appear. Click File Explorer.
    3. The Computer window appears on the Windows desktop. Click the file location from the navigation panel on the left. (Example: If the file you're looking for is in the Documents folder, click Documents, and browse to the desired file.)
    I hope this helps. If have further questions please let us know!
    Please click the thumbs up button to say "Thanks!"
    Clicking "Accept as Solution" on a reply that solves your problem makes it easier for other people to find solutions.
    I am an HP employee.

  • How to open pages documents with windows vista

    Does anyone know how to open pages document with windows vista? i saved it onto a usb stick but when i tried to open it on the computers in my university which support windows vista, it didnt reconise the file and opened with a page of question marks!!!! Im panicking now!!!!!
    Id appreciate any help!!! thanks!!!!!

    beckstarr wrote:
    Does anyone know how to open pages document with windows vista? i saved it onto a usb stick but when i tried to open it on the computers in my university which support windows vista, it didnt reconise the file and opened with a page of question marks!!!! Im panicking now!!!!!
    You cannot open it on Windows Vista. The only application in the world that opens a Pages document is Pages, and it is Mac OS X only.
    Your options:
    1. Find a Mac with Pages installed, and save the document as doc or pdf, which you can open on Vista.
    or, if that is impossible,
    2. Open the files in a texteditor like Notepad.exe on Windows and try to piece text fragments together to get at least part of your original text back. The images should also be available somewhere, even though all formatting is gone.

  • Pages won't let me move my document out of the cloud

    The instructions for moving a Pages document out of the cloud is to go to the menue at the top of the screen, choose.   "File>Move to".  BUT...  Move To is not a highlighted option.  I cannot choose it.  What is wrong?

    You have to open a document before the Move To option is available.

  • Not able to sign in in FBA from out side the server.

    Hello All,
    I have created https enabled web application and sitecollection using power shell. After creating web application, I have enabled claimed based authentication using below mentioned code :
    $wa = get-SPWebApplication https://tenant-test02.mydomain.ch
    $wa.UseClaimsAuthentication = $true
    $wa.Update()
    I have enabled FBA on my sharepoint foundation 2013. I am using default login page for login mechanism. While accessing pages from the SharePoint server, login mechanism works successfully. But when I am trying to open same site from out side the network,
    it shows the login page but its showing error message when clicking on "Login" button.
    From the co-relation Id I am getting below error message.
    "Cannot get Membership Provider with name "mycutomprovider". The membership provider for this process was not properly configured. You must configure the membership provider in the .config file for every SharePoint process"
    Any suggestion ?

    Hi Suhil,
    According to your description, my understanding is that the error occurred when you accessed the site with FBA from outside.
    Did you add the membership provider settings to the machine.config or to each web.config files?
    If not, please refer to the link below to implement this:
    http://chrisbarba.com/2013/07/16/sharepoint-2013-forms-based-authentication-fba/
    If you access the extended web application from outside, then please check if the extended zone has been configured to use the form based authentication.
    http://technet.microsoft.com/en-us/library/cc261814(v=office.15).aspx#section3
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • I'm a new Mac user. I imported photos from my PC they ended up in iphoto library on the hard drive, but when I open iphoto from my dock its empty. How do I import those photos to the dock file?

    I'm a new Mac user. I imported photos from my PC through a jump drive and they ended up in my iphoto library on the hard drive but when I open iphoto from the dock its empty. How do I import those photos to the dock file from the iphoto library?

    Paragon Software has the most reliable NTFS driver for Mac
    tips on importing and organizing, transferring from Windows etc
    http://www.apple.com/support/itunes
    http://www.ilounge.com

  • How to open a report stored in the CMS with the RDC ?

    Hello,
    With CRXIR2, reports can be stored in the CMS.
    Does anybody knows how to open such a report with the RDC (version 11.5) ?
    I really need to use the RDC because I have to save subreports on HDD
    and it is unavailable with the RAS SDK (neither Java nor .Net).
    Thank you for your help.
    Alain

    Hi Don,
    Thanks for your answer,
    Why saving subreports ?
    - orthogonality reasons... we can import them, why c'ant we do the opposite?
    - consitency reasons... we should be able to do the same as we do with the designer, (why this option is available in the Designer ?)
    Furthermore, the job is already done in Crystal, it should not be so difficult to port it to the RAS.
    - regression reasons... this is something we could do in the past (from Delphi, with the RDC), now the RDC is gone....
    Now I will tell you my personal reason:
    We have huge reports (about 30 subreports), based on huge business views.
    As a result, just loading the report (openClientDocument) takes more than one minute.
    In a production environment the custommers do not want to accept that.
    So:
    - we keep the business views at design time because it's a requirement
    - Once the report designed I try to cut the BusinessViews and replace them by SQL commands
    I suppose you know the RAS to be aware that it can't do that by far.
    I wrote a program to disconnect all the ReportObjects from the BusinessView, it's Ok
    Now I need to remove the BusinessViews from the report and all subreports.
    I can automate CrystalReports for it, but only at the report level...
    This is my particuliar reason for saving subreports.
    Am I the only one to have this request ?
    If you want, of course, I'm ready to help developing those missing things in the RAS.
    I'm serious, tell me if you are interested.
    Thank you again and best regards
    Alain

  • Part of my headphones plug broke off in the port. how do i get it out? the genius bar said their tweezers would not fit

    part of my headphones plug broke off in the port. how do i get it out? the genius bar said their tweezers would not fit

    get smaller tweezers.  you need some type of small instrument.

Maybe you are looking for