Accessing image from dist/imgaes folder inside JSPDynpage Component

Hi,
I have a sceanario where I want to access JPG image stored in dist/images folder inside JSPDynpage Component java file.
It is ok if I get it in the form of a byte array (byte[]).
Any idea how to achieve it?
Please help.
Thanks and regards,
Amey Mogare

>
Amey Mogare wrote:
> Hi Clemens,
>
> Thank you. It worked.
>
> For my surprise, Isolation mode of iView is Embedded, but still it wasn't working for me!
>
> I tried your code and it worked!
>
>        IResource res = request.getResource(IResource.IMAGE, "images/draft.jpg");           
>      String myServerPrefix = "http://mytest.com";
>      String url = myServerPrefix + res.getResourceInformation().getURL(request);     
>
>
> Now, can you tell me how to I get rid of this hard-coding server URL?
>
> Thanks and regards,
> Amey Mogare
Hi Arney,
maybe you should first also give the suggestion of ram another chance, because you can also use it in your class code:
String url = request.getWebResourcePath() + "/images/draft.jpg";
Otherwise to avoid the hardcoding you can either perform configuration in your portalapp.xml with the server prefix and read it out, or write a little method that retrieves your server name. This is however not as trivial as it might look like. I personally have a method like follows:
public String getBasePortalUrl(IPortalComponentRequest request) {
     StringBuffer requestURL = request.getServletRequest().getRequestURL();
     //Parse the server name,port etc. out of this request url, depending on your system environment
     //Normally you parse till you get to /irj

Similar Messages

  • I am new to Mac and am having trouble with uploading images from my pictures folder to Facebook and other share sites- some of my images are accessible while others are seemingly locked....

    I am new to Mac and am having trouble up loafing images from my pictures folder to photography sites and Facebook. Some of the saved images are accessible, while others are not, ( they are light colored and cannot be uploaded) I am not saving them any differently.

    Hi Robodisko,
    Thanks for your prompt reply...... 
    I often proof my work in preview then edit images in photoshop and rename from there.  The dsc images are renamed to correlate the name of the class etc.  i.e. dcs_001 is saved as the file name required 7A.jpeg etc.
    The file names are required to correlate what is what and so on..........

  • How can I access images from IPhoto on my Mac to Photoshop CS6

    How can I access images from IPhoto library on my Mac to Photoshop CS6?  I enable jpg with format "Photoshop" and this is what comes up -  "Could not complete your request because Photoshop does not recognize this type of file" 

    MountainArtist wrote:
    …I enable jpg with format "Photoshop" and this is what comes up -  "Could not complete your request because Photoshop does not recognize this type of file" 
    Photoshop is not a format.  It's an application.
    What you are looking at are not true JPEGs, just iPhoto's "tease" representations of the hidden images it swallowed, as explained above.

  • How can I update Camera raw for Photoshop CS5 to access images from Canon Rebel T4i?

    How can I update Camera Raw for Photoshop CS5 to access images from Canon Rebel T4i? The updated version of Camera Raw 7 says it only works with CS6. Outside of buying a new Photoshop, is there anything I can do?

    Buy Lightroom (much cheaper alternative to Photoshop) - does all your 'Photo-related' tasks. Full version of LightRoom 4 is $149/- - http://www.adobe.com/products/photoshop-lightroom.html
    LightRoom 4 supports ACR (Adobe Camera Raw) 7. Once processed with Lightroom, if you still need, you could take the photo in JPG or TIFF format into Photoshop CS5 for further processing.
    Another option is to use Canon Raw Codec that would've come with your camera's box to process the RAW images and then take them into Photoshop.

  • When watching a slideshow I could always access music from my iTunes folder.  Suddenly today I can only hear music under the 'theme' tab.  I can see my music in iTunes but when I double click on it nothing happens!

    when watching a slideshow I could always access music from my iTunes folder.  Suddenly today I can only hear music under the 'theme' tab.  I can see my music in iTunes but when I double click on it nothing happens!

    In iTunes go File -> Library -> Organise Library -> Reorganise Library.
    Then quit and restart iPhoto.
    Credit to user keysandfood who figured that one out.

  • Access image from jspdynpage

    I am trying to access the image from jspdynpage.  I placed image at dist/images folder of my EP project.  I export the par to the server.  I used the src path for the img element is "images/demo1.jpg".  It is displaying in my jsp page.  Help is appreciated.  I have another quesiton is that can I place all images in one of the directory.  From jspDynpage can we access these images or not?
    -Sudheer.

    Sudheer,
       You could do the following.
    <% String img = componentRequest.getWebResourcePath() + "/images/demo1.jpg"; %>
    <img border="0" src=<%=img%> width="50" height="50">

  • Display image from the attachment folder

    Hello,
    At the moment I am working on an embedded component for the marketing lead TI.
    The purpose of the component is to show a image stored in the attachment folder.
    In order to realize my plan I used a image control in the UI designer and bound it to the BinaryObject of the document from the attachment folder.
    However, the stored image won't be shown in the image control.
    Do you have any suggestions to solve my problem?
    Thank you in advance
    Best regards
    Sebastian

    Hey,
    I am still working on the same issue. But it´s not working, the image won´t be shown in the image control.
    Do you have any other ideas?
    I very much appreciate your help and suggestions.
    Here are my screenshots:
    Best regards
    Sebastian

  • Accessing images from shared components

    I am having problem finding out images from shared components. After loading my images from my desktop to shared components folder, when i try to create an image item, and click the browse button, it pulls out my hard drive for selection. i don't know how to get the images already in shared components. i read in the help file that if i know the name of the image, then i can write it down and portal will pull it out. but what if i don't remember. do i have to go to shared components to find what it is and then come back and write it in the textbox?how to get to shared components clicking browse and selecting the image we want which is already stored in portal?
    thanks
    valli

    There's no way to browse and select the images in shared components. You need to know the URL to the image if you want to reference it in an item.

  • Cant' move images from frame to frame inside a Grid in InDesign. Please Help

    When creating a grid in indesign there is an option to move images from frame to frame, and having them rotate around the frames to see where each image is best to be placed. Example I created a grid with 6 images (2 rows and 3 columns) and now i want image 1 to be where image 6 is. I know there's a way by hitting the arrows and some other keys and have all the images start rotating. I did it once I just can't remember. Please help. How do you move the an image from one frame to another frame without having to go to edit place?
    Thanks,
    Paola

    Swapping images

  • How access images from iPhoto Library?

    I appear to have done something terrible with one of my iPhoto libraries.
    Over the holidays, as I recall, I had attempted to move the iPhoto library from the computer to an external hard drive.
    This particular library, now on the external drive, shows 266 gigabytes in the finder, but I can't access any of the images.
    So, something appears to be in the iPhoto library, but something may be missing that permits access.
    If there's no hope of recovery of 2 years of images, should I just delete the library -- and lose all images forever?
    Or, is there some hope or method of recovery?

    Well it wouold really help if you told us that version of iPhoto you have - and exactly what you did? and exactly what is happening?  we know nothing at all about your or your system except what you tell us - which at this stage is only that you have a problem of some sort.
    The only wild guess I can make at this time it for you to depress and hold the option key and launch iPhoto and select the library on the external drive.
    LN

  • Accessing images from content areas

    I have added an image item to a content area. I want to use this image elsewhere as part of an image rollover in a portlet. How do I gain access to tehis image so it can be used as part of a javascript routine?

    Gerry,
    You can create a logical URL to the image. Check the Portal online help for the topic "Direct Access URL". The Direct Access URL for any item is displayed in its property sheet. The property sheet can be displayed by editing the Folder Style/Folder Layout.
    You can also get the image's physical URL by right-clicking on the image and viewing its properties (in IE).
    Regards,
    Jerry
    null

  • Rescuing and/or Accessing Images From Aperture Database Without Aperture

    Early reviews of Aperture mentioned that Aperture created a closed, inaccessible database of all the images contained therein. This apparently means that these images cannot be accessed unless you have Aperture. Does anyone else feel nervous about this? What happens if the Aperture database is corrupted and won't open? As far as I can see, you would be toast because you couldn't reach your images. I would appreciate hearing from someone who can address these concerns. How stable is the Aperture database? Is there a chance it could be corrupted and refuse to open? And if so, how would you go about rebuilding it and/or rescuing your images? It also appears that the only way you can move images is by exporting them (which requires a working program).
    Any thoughts?

    No problem! Trying to answer these questions is a very helpful way to learn the app by looking at aspects of it I have not encountered yet.
    Yes, you can rebuild the Aperture database in a similar way to Entourage (and iPhoto). Holding down command-option after launching Aperture will make a Rebuild Library dialog appear. HOWEVER, don't do this unless you really want to see it work, because there seems to be no way to cancel the process. You can choose Rebuild Now or Don't Rebuild. If you choose Don't Rebuild, your Projects will nonetheless need to be recovered before use. The dialog mentions a Rebuild Later button, but there is no such button available.
    I have done this a few times both ways in the course of writing this, and there does not seem to be any negatives to rebuilding other than the time rebuilding takes, so if your projects aren't large it may be worth doing now to get comfortable with the process.
    G5 Dual 2.7   Mac OS X (10.4.3)  

  • Can't access models from My models folder in other userid

    Dear SDNs,
    I have a Visual composer models designed and saved in MyModels folder of my userid. It was by mistake. But now i want to open them using the other userid, it says Server Error: Failed to open my model. How can i move models from MyModel folder to Public, so that it can be accessable from any userid.
    Appreciate if you can provide inputs ASAP.
    Regards,
    Lakshmi.

    Hi
    Follow the process Below -
    1. login with your user ID
    2. Go to 'Model (Left Upper Corner) ->Export model & then save to desktop.
    3. Create New Model in 'Public Folder'.
    4. Again go to 'Model' -> 'Import' Model.
    5. Save & deply the Model.
    Now you can open this model with any ID.
    Regards
    Sandeep

  • How can i reassign images from a secondary folder to the primary folder?

    I have two LR library folders, 2014 high-level folder and another 2014 folder as a sub-folder to the high-level 2014 folder. (Yes, I screwed up.) How do I end up with all images in the high-level folder only and delete the sub-level folder?

    OK, I think I have found the problem...and it is I. There is a check box in LR/Import option under Destination in the right panel. The "Into Subfolder" check box was checked indicating that LR should create a subfolder (child) under whatever folder was indicated for the imported images to go to when importing. I unchecked this box and everything is OK. I must have unwittingly hit a key activating the subfolder creation option and didn't notice it.
    Thanks for helping out. I really appreciate when someone takes the time and trouble to help others.

  • Accessing Image from oracle to VB.

    How can access the stored image in oracle 8.0 table to Visual BASIC 6.0.?
    PLease give me the help regarding to its supporting file , if it is using any file, like ocx, dll etc.
    And also give me the links for getting its ocx and dll files.

    Here's an Oracle Magazine article that illustrates how to display an image stored as a blob in the database on a Windows Form:
    http://www.oracle.com/technology/oramag/oracle/05-nov/o65odpnet.html
    Perhaps that will be enough to get you going in the right direction.
    - Mark

Maybe you are looking for

  • Runtime Error every 3mins - SAPLBP_CENTRAL_PERSON or SWWDHEX

    HI, I hope somebody can help me here, here's my problem: When i checked the list of Runtime Errors (ST22), i found out that there is a RAISE_EXCEPTION error that occurs every 3 minutes. It started last week, though we didnt schedule any background jo

  • [mount] FAT: codepage cp1252 not found

    Hello When I mount an usb memory (FAT32), accents (special non-english characters) are incorrectly read by the system (bad display when listing files for example). mount uses "cp850" for FAT32. For western european microsoft codepage (cp1252), I try

  • Exchange support for Public Calendars

    Hi all, I've setup ms exchange with work and all my email and calendar events sync wireless with out any problems. We also have a department calendar I would link to sync to wirelessly. How do I do this. I don't want to connect my iPod to my computer

  • Please Help! Change RG60G to 802.11b?!

    Hey all, How can i change the RG60G MSI wireless router to 802.11b from 802.11b/g, 802,11g? Please Answer Asap

  • Slow export for no reason

    Hi fellow mac users. I have two macs. One of the macs has a much faster exporting speed that the other for Imovie HD. I heard about it being something about one using DV maybe? Well it takes on the slow exporting mac 20 minutes to export a 10 minute