get the Inputstream of the file jasper from a specific path

Hello

I use jdev 11.1.1.7.0

I need to get the InputStream of the file jasper in my application to view the report in PDF format. I do this by following codes:


ServletContext context = getContext();
InputStream inputstream = context.getResourceAsStream(repPath); //  repPath = "reports/reportName.jasper"



whereas the repPath is the folder that exist in the current application (ViewController\public_html\reports\reportName.jasper)

but I want to put all in a specific folder as "d:\reports" and all reports call for applications of this path.

but when I put repPath = "d://reports//reportName.jasper", the variable in the code below inputstream is null


InputStream inputstream = context.getResourceAsStream(repPath); //  repPath = "d://reports/reportName.jasper"



I need to have a specific for all reports path, because some reports can be called from many applications, can someone help me?

Habib

Concerning

getResourceAsStream() return resources compared to the current ClassLoader.

You can use something like:

inputstream = new FileInputStream(repPath);

Dario

Tags: Java

Similar Questions

  • How to get the file downloaded from ECS

    Hello

    I have the situation where I have to send back the ECS file we downloaded in B2B configurations.
    Unfortunately we lost the ecs file we downloaded. Is there a way we can recover the file ecs.

    Concerning
    Kiran

    Hello

    It is strongly recommended to access the tables directly unless there is a strong personalization use case. Using the layer BLL is perhaps the right thing to do.

    Anyway, here's the information on ecs tbl file:
    Select b.SID from tip_parameter_t a, TIP_DOCUMENTTYPEPARAMETERVAL_T b where a.id = b.DOCUMENTTYPEPARAMETER and b.SID like '% % ECS ';

    Need to connect the 2 following tables to get to the DTD/XSD.
    tip_documentdefinition_t
    tip_nativedatatype_T

    Rgds,
    Riou

  • I am trying to reinstall windows xp from disk but it only gets up to this request then for service pack 1 disc when I press on enter I get the file 'asms' on windows xp pro Service Pack1 necessary

    I am trying to reinstall windows xp from disk but it only gets up to this request then for service pack 1 disc when I press on enter I get the file 'asms' on windows xp pro service pack 1 cd needed someone had this problem and managed to solve it thanks a lot

    Hello

    Thanks for joining us on the Microsoft Community.

    According to the description of the problem you are facing problems with reinstalling Windows XP Professional, and you are to be invited to insert the Service Pack 1 drive to complete the installation.

    To help you to propose measures to solve the problem, I would appreciate if you could answer the following questions:

    1. did you uninstall Windows XP Service Pack 1 prior to reinstalling Windows XP?

    2. what was the installed Service Pack earlier?

    You may need to uninstall Windows XP Service Pack 1 first and then perform the reinstallation of Windows XP and to check if the installation goes smoothly.

    Please see the following articles for more information about uninstalling Windows XP Service Pack 1:

    How to manually remove Windows XP Service Pack 1

    http://support.Microsoft.com/kb/329015

     

    How to remove folders from Windows XP Service Pack 1

    http://support.Microsoft.com/kb/329260?WA=wsignin1.0

    Hope this information helps. Please come back for any clarification on this or any issue of Windows. We will be happy to help you.

  • I have just reactivated Dreamweaver on a new computer.  How can I get the files FROM my website ON my computer so I can edit/update using Dreamweaver.

    I have just reactivated Dreamweaver on a new computer.  How can I get the files FROM my website ON my computer so I can edit/update using Dreamweaver?

    If your old machine still works, export your definition of original site to a portable player, copy in your new machine and then import the site definition to the new machine. The definition file will have the extension .ste

    Create an empty folder on your new machine.

    Define a 'new' web site on your new machine to point to the new local root folder.

    Log your server and download all of the subfolders and files in the folder root from the server to the new local root folder.

  • In a direct way: How can I get the files from Adobe Photoshop or Illustrator sketches?

    I type sent to the PS or Illustrator I get the message "Sent", but nothing happens in my CC account (in exodus the file I work in is not stored in memory) or in my Office Photoshop. What can go wrong?

    Here's what you need to make this feature work correctly:

    1. Make sure you have the latest version of the installed Creative Cloud Desktop application. You can get the latest software from here
    2. You must subscribe to the creative cloud, CC of Photoshop or Illustrator CC.
    3. You must be connected to your software CC (CC Desktop app, CC of Photoshop or Illustrator)

    If all goes well, which solves the problem. If not, send me another line.

    Thank you

    Will Eisley

    Product Manager

  • Cannot get the file to be imported.

    I tried the method of JoseIbarra - I did as suggested but cannot get the file to be imported in the services file. He never asked me if I wanted to add the information in the registry, so it is still on the office. Don't know what to do from here.

    Please stick to the initial conversation.

    Is this you speak of course (*first conversation*):
    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-system/how-do-i-get-print-spooler-back-into-my-Windows-XP/ed014329-1bd3-458d-9C93-bbb306fc731f

    You also made this one:
    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-system/print-spooler/c4610093-a96f-4476-B263-eecf5b8fc339

    (but please do not reply to this one...)

    And this one:
    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-system/continuation-of-print-spooler-problem/0e885d7b-3e64-42ee-A248-9d9f2a8e26c5

    (Even once - keep the * first conversation * going.)  Written on it.  Show how this conversation continues spreading around.)

    BTW - my suggestion has not changed.  I still think that you get just around issues that still exist, probably, by fixing the little things you need at a given time.

    Backup important files/folders (for you) (including documents, photos, music, Favorites, Internet favorites, files installable application, serial numbers, product keys, spreadsheets, you saved to the desktop email, etc.) and wipe the disc completely - I'd even a zero writing on the disc (formatting) before installing the operating system from the original installation media.  Then install your applications and restore your files.

    As to what they were asked to do... Always seems that you saved the file as a *. TXT file and not a *. REG or there is much more wrong with your machine (see my suggestion above.)

    Visit this web page to look at the photo on the left (a first) to see the screenshot of the possible is the desktop icons and let us know if it looks like the left or right of each photo version (answer here or in the longer conversation.)  * Ignore the first part of the file name - as you might have named something else than "addspooler."

    To check if you saved incorrectly or if there is something wrong with your system (or two) - right click on the file you saved and choose 'Properties' from the menu you get.  Under the 'Général' tab, she said, "file Type: registration entries (.reg)" and "opens with: Registry Editor" or something similar?  Visit this web page to look at the picture on the right (second) to see the screenshot of the possible look at the windows of the property and let us know if it looks like the left or right of each photo version (answer here or in the longer conversation.)  * Ignore the first part of the file name - as you might have named something else than "addspooler."

  • Smartphones blackBerry synchronization error - failed to get the file

    BlackBerry Torch 9860 software v 7.0 Bundle 2406

    Can someone help me with this error message of synchronization:

    "An error occurred during an attempt to access a record of the database of the device."

    Details below.

    engine 08:46:51.759 waiting for the user to input - message WPF event for messageId 15003 raised read 310 records
    08:46:51.762 engine work - full message event for messageId 15003 read 310 records
    08:46:51.859 CBBTransBase::GoToRecord - could not get the file FFFFFB45
    08:46:51.860 error information: 18008 (00004658) (KnownErrorWithLocalizedText), Description: an error occurred during an attempt to access a record of database device., File:.\BBTransBase.cpp, line: 736
    08:46:51.860 CRSyncUtil::GetTranslator: FeedProfileShim2Trans (responsible Trans) BlackBerry
    08:46:51.860 CRSyncUtil::FeedProfileShim2Trans: returns 0
    08:46:51.860 CRSyncUtil::LogFatalTransError: 'GoToRecord()' 'RimBB' translator for the "Contacts" application API returned empty error
    08:46:51.860 CBBTransContact::Close - clean temporary fixation for contacts files
    08:46:51.862 CBBTransBase::Close - Mode: 4
    08:46:51.862 CBBTransBase::Close - commit the change log
    08:46:51.862 CBBTransBase::Close - save information from source database device
    08:46:51.976 CBBTransBase::Close - peripheral close database
    08:46:51.976 CBBTransChangeLog::Close - close change log db. Record count: 474. Db file: C:\Users\Bob\AppData\Local\Research in Motion\BlackBerry Desktop\XCPCSync.OEM\SyncSDK.209.601\Translators\RimBB\Contract{8BCB53647E24F3BB61A8E73C4FDAB}.adt
    08:46:51.990 enter COLTransBase::Close - Mode - 4
    Synchronization of end of 08:46:51.991 with error 2

    Glad to hear it is working now.

    Don't forget to let us know if you have any other questions.

  • How can I get the file name of a report, I have just stored in the cache

    I would like to be able to get the file name of the report that is stored in the cache directory.

    When a report is created from forms to help

    SET_REPORT_OBJECT_PROPERTY (v_report_id, report_desname, 'fubar.pdf');

    In the cache directory a file is created something like fubarABC123DE.pdf. I guess that part of ABC123DE is the cache key.

    I want to be able to read this file from another process. This process cannot use http, so I can't pass the URL. However, I would still be able to access by using the URL.

    Is all the same to get at the file name?

    The answer is, according to management, you can get the name of the file in the cache, so if you want to access the file you need to store somewhere else.

  • How to get the files in the subfolder by Apple Script

    say application 'Finder '.

    the value ArtFolder to choose a folder with guest "Select the folder of Art: - > >".

    set ChapNameFolders to the folder list ArtFolder without invisible

    Repeat with ChapFolder in ChapNameFolders

    set ArtFiles for files in ChapFolder

    display the dialog ( )County ArtFiles( )


    Repeat with ArtFileItem in ArtFiles

    value FileInfo info for ArtFileItem

    set File name to the of ArtFileItem name

    if folder of FileInfo is true then

    view the dialog box FileName as string

    end if

    end Repeat

    end Repeat

    end say

    ===========================================>>

    I used code above to get the files in the subfolder, but it does not, it will fail in second REPEAT & do not get the files in the subfolder...

    Can someone help me solve this problem...

    Thank you.

    My problem has been resolved by this code: -.

    say application 'Finder '.

    the value ArtFolder to choose a folder with prompt "select Art Folder :---> >.

    Repeat with ChapFolder in (get each folder from the folder ArtFolder)

    Repeat with ArtFile in (get each file from the folder ( as aliasChapFolder))

    display the dialog box ArtFile string

    end Repeat

    end Repeat

    end say


    Thank you...

  • I can't get the file number I need for the license transfer process. Help, please.

    I can't get the file number I need for the license transfer process. Help, please.

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...
    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Get help from cat with orders, refunds and exchanges (non - CC)
    http://helpx.Adobe.com/x-productkb/global/service-b.html ( http://adobe.ly/1d3k3a5 )

  • Is it possible to copy the path of the file directly from bridge?

    I am looking for a way to copy the path of the file directly from bridge. Does anyone know if there is a way? Usually the Finder I a copy of 'get info '.

    Thank you

    Click on the last item in the path bar or in the empty space to the right of the last point.  This will change the contents of address bar path to a mode that is editable by the full path highlighted then you can copy to the Clipboard (and spent as you wish).  Press ESC to return to the normal path display mode.

  • Is it possible to get the files for windows vista, so I can reinstall my system?

    Hello

    Im a user of linux on one machine HP Pavilion dv5-1095eo leisure. IM tired to restart my machine to run a windows OS, so is possible for me to get the files for windows vista. I got the windows key attached under the computer and I don't have any windows CD when I brought the machine.

    Hello:

    You can do your own installation disc Vista too if you wish.

    If you can read your 25-character product key MS, you can make your own Windows Vista installation disc. You just download the 3 files you need on the link below and read all the instructions to create a Setup bootable DVD disk using imageburn.

    When I went to compile the ISO file, ImageBurn gave a message on a WIM file, file and ISO, and if I wanted to burn it in a different format.

    I selected no, make the ISO file.

    It was not so hard to do. I burned both the disk of 64-bit and 32-bit disk in case I ever need them.

    I tested both of them (just before going forward with the actual facility) and they seem to work perfectly.

    Apparently, when you enter the product key, he knows which version of Vista you have.

    http://en.community.Dell.com/support-forums/software-OS/w/microsoft_os/3317.2-3-Microsoft-Windows-VI...

    After you have successfully installed vista, you can download the drivers you need your PC support and driver page.

    Paul

  • I can't get the file "Delete empty" vacuum. He has worked in the past. I have Vista and use Windows Mail.

    I can't get the file "Delete empty" vacuum.  He has worked in the past.  I have Vista and use Windows M

    Duplicate of:
    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-networking/empty-delete-mail-function-doesn ' t/43a2d3a8-5b7a-e011-9b4b-68b599b31bf5

  • can I copy the file .iso from window of a disk to another drive and can copied .iso file of window to be used to make bootable USB key?

    can I copy the file .iso from window of a disk to another drive and can copied .iso file of window to be used to make bootable USB key?

    I have the iso image of the window, and I want to copy the iso file on my hard drive for pen drive to make the bootable USB key in the future. So I want to know that can copied .iso file of window et to make the bootable USB key?

    Discussions were merged.

    Deleted duplicate.

    Hello

    This should help you.

    How to create an Installation USB Flash Drive with an ISO file:

    http://www.SevenForums.com/tutorials/2432-USB-Windows-7-installation-key-drive-create.html

    See you soon.

  • Dreamweaver CC 2015 offers to get the files that are not in my root folder

    Dreamweaver CC 2015 offers to get the files, but when I manually check the folder, where it shows some files during the synchronization process, there is nothing. Why?

    Clear your cache.

    Clear Cache corrupted in DW

    http://forums.Adobe.com/thread/494811

    Nancy O.

Maybe you are looking for

  • Trash is full when empty

    Hi, I visited Microsoft Fix - It and there was a fix for this problem, but it did not work. I ran sfc/scannow to check all my files system were good. MSE shows no threat detected. I have not yet tried F5, but will the next time it happens. Thanks for

  • Software from my computer

    How can I download software from my computer on my flash drive?

  • Display on Photosmart D6160 ink levels

    I upgraded my computer to Windows 7 OS. Your website says D6160 drivers are already installed but apparently without the functionality of viewing ink levels. The printer will not print because the ink light indicates a cartridge is empty, but I have

  • RE: Froyo 2.2 for Nexus One version comes from the official website of Android

    Sweet Georgia peach son, why a bike out employee and Manager of forum have access to thread locking here?  For not to mention the person owns a Backflip and not a droid. In addition, still not sure how the article could be interpreted as piracy since

  • Fixed assets year end.

    Hi all.I am new to Oracle Financials R11i.Please could someone of you gurus help me with steps to take before you close the month for fixed assets.I'm stuck or am not supposed to be stuck at this point.What should I do before I printed the first draf