Displaying images from url's (9i)

Is it possible to some how display images retrieved from a url within an image item? I know its possible to display images from within the database and from a file but these images are stored on another server and all i have is a web address, can it be done? Also is it possible to dislpay a series of images that are retrieved in this way in a report?
Any help is much appreciated.

Hi,
this would require a Java Bean to be written. Its not natively possible in Forms
Frank

Similar Messages

  • Displaying images from url connection

    I'm working on an application that extracts information from html content (textual, colors, images...) and evaluates rates of emotion and personality.
    I need to access and display images contained in a web page.
    How can I add an image to a pane and display it knowing its url,
    for example I want to display image.jpg knowing http://www.website.com/image.jpg

    The ImageIcon class in javax.swing can accept a URL in the constructor:
    public ImageIcon(URL location)

  • Display Image from URL

    Hi Experts,
    I am new to BSP. I have a requirement like I need to display an image which is stored in a url. The URL will be changed depending on the document no.
    Please suggest how can I display the image on BSP dynamically based on the document no? I will get the URL from a table.
    Thanks in advance.
    Regards,
    Ranganadh.

    Hi Ranganadh,
    You can use a variable to hold the URL type string.
    Populate the url into the variable from table like
    <%
    data lv_url type string.
    select URL from URL_TABLE into lv_url where document_no = 'xyz'.
    %>
    Same can be passed to the image source attribute
    img src = "<%= lv_url %>"
    Regards,
    Ravi

  • Problem loading & displaying images from URL

    hi,
    I can't manage to display an image into a component from a url... here is what my code looks like :
    public class ImageComponent extends JComponent{
        private ImageIcon imageIcon;
        public void paint(Graphics g){
            if(imageIcon!=null){
                imageIcon.paintIcon(this, g, posX, posY);
        private void loadsImage(String imageURL){
            imageIcon = new javax.swing.ImageIcon(imageURL);
            invalidate();
    }when I call loadImage with a proper url, the image doesn't seem to be loaded...
    it might be that the image is big and long to come (also my connection isn't that fast)... but forcing the repaint of the component (by hiding/showin the component's window) after a good while doesn't do much...
    can anybody tell me where I'm doing wrong...
    cheers,
    DrLeinster

    hi,
    looks like PaintComponent() instead of paint did the job.
    thanks a million..
    for those interested in loading images, I find ImageIcon very limited and at the end I found a better solution :
    public class ImageComponent extends JComponent implements ImageObserver{
        private Image image;
        public void loadImage(URL imageURL){           
                image = Toolkit.getDefaultToolkit().getImage(imageURL);
                prepareImage(image,getWidth(),getHeight(), this);
        public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height){
            System.out.print("."); // loading progress...
        public void paintComponent(Graphics g){
            if(image!=null){
                 g.drawImage(image,0,0,null);
    }it is far nicer as it displays dots while loading... up to you to attach progress bars or favorit loading guizmo...
    DrLeinster.

  • Problem Displaying image from blob

    Hi all,
    I m using,
    Database : 10g Rel 2
    Frontend : DevSuite 10g
    OS : WinXp
    Browser : IE 6
    Problem : In my forms i m displaying images from blob column but some of the images are not displayed. I have tried with all image formats available in combination with all available display quality but no luck. What could be the reason for it and how do i solve it?
    Can anyone help me plz?
    Thnx in advance.
    Imtiaz

    Hello,
    It is very difficult for us to "guess" what images you can read and what others you cannot.
    Maybe you could provide more information on images that are not displayed ?
    What is their native format ?
    Francois

  • My iphone 4s suddenly displays images from Yahoo, Google, and Flickr at low resolution. The camera on my phone works fine, but any web related photo content is now pixelated and low res, what's the deal?

    My iphone 4s suddenly displays images from Yahoo, Google, and Flickr at a low resolution. I have IOS 7.0.4. My phone camera works fine, but any web based photo content from Safari, Yahoo images, Google images, and Flickr all come in pixelated and low res. What's the deal?

    It happened to me but later I figured out that cellular signal was not that great and so the Internet was very slow. It took me about 2 minutes to get the full resolution picuture on either of the app you've described. Try to get faster internet either by wifi or good signal and then check.

  • Display image from table!

    Hi,
    I have in my aplication a table user, where we can save is image:
    t_user{id_user, name , adress..., foto(blob),foto_size(number),foto_name,foto_mime_type};
    An user can upload his imageand save it in his table!
    I wanted to display his image, but i onle found infomation how to show images saved in htmldb_application_files:
    how to display image from tables?
    Thank's in advance

    Look at the sample application. It shows you how to do this

  • Display Images from  HTMLDB_APPLICATION_FILES Table?

    How do I display images from the HTMLDB_APPLICATION_FILES Table?
    Are the contents full available potentially for display? Or only after I have written them to another display?
    Please advise what I need to do or what corrections below is required:
    The calling procedure is a item in a SELECT statement as part of a report query:
    <P>
    <(img src="#OWNER#.download_HAF_file?p_file=  ' || nvl(ID,0) || ' height="50" width="50" )>, HAFimg<P>
    The Procedure is a adaptation of the Chapter 8 Exercise of the 2 day developer guide:
    CREATE OR REPLACE PROCEDURE "DOWNLOAD_HAF_FILE" (p_file IN NUMBER) AS
         v_mime VARCHAR2(48);
         v_length NUMBER;
         v_file_name VARCHAR2(2000);
         Lob_loc BLOB;
    BEGIN
         SELECT MIME_TYPE, BLOB_CONTENT, NAME, DBMS_LOB.GETLENGTH(BLOB_CONTENT)
         INTO v_mime, lob_loc, v_file_name, v_length
         FROM HTMLDB_APPLICATION_FILES
         WHERE ID = p_file;
         -- set up HTTP header
         -- use an NVL around the mime type and
         -- if it is a null set it to application/octect
         -- application/octect may launch a download window from windows
         owa_util.mime_header( NVL(v_mime,'application/octet'), FALSE );
         -- set the size so the browser knows how much to download
         htp.p('Content-length: ' || v_length);
         -- the filename will be used by the browser if the users does a save as
         htp.p('Content-Disposition: attachment; filename="'||SUBSTR(v_file_name,INSTR(v_file_name,'/')+1)|| '"');
         -- close the headers
         owa_util.http_header_close;
         -- download the BLOB
         wpg_docload.download_file( Lob_loc );
    END Download_HAF_File;
    /Message was edited by:
    luddite1812

    I believe you put HTML "pre" tags around your quote (with square brackets, I can't type them here because they'll be escaped).
    If the example below looks formatted then using "pre" works, if not...then ignore me ;)
    begin
      select
        count(*)
      into
        v_count
      from big_table;
    end;

  • Display images from a SQL database

    I want to display images from a SQL database. The images are in a table under a specific column and are stored as a link to the image. How would I display the images from the column in LabVIEW?
    I'm using LabVIEW 2013 version 13 and SQL Server 2012
    Paul Power
    I have not lost my mind, it's backed up on a disk somewhere

    Hi PauldePaor,
    I hope you are well.
    Once you have pulled the data from the database into LabVIEW in a string form (or path), you can simply use the Read BMP File (Or jpg, png depending on the file type) VI.
    More information can be found here:
    http://digital.ni.com/public.nsf/allkb/02971A30F5D8FC6986256A0A004F11A0
    Kind Regards,
    Aidan H
    Applications Engineer
    National Instruments UK & Ireland

  • How to display image from wamp if the data type i use is blob?

    please help me with the problem of displaying image from wamp if data type is blob. Thanks

    Don't store the images in the database. Store the image file names in the database and put the images in a folder.

  • Download Images from URL

    I want to save images to memory 50 images
    My software processing ----
    1. Download Image from URL every 60 secs and all downloaded images have time to use 15 mins
    2. When download image done save images to memory
    3. Then show images in picturebox
    4. When user click button get next image form memory and delete old image from memory
    5. If what images not use in 15 mins auto delete from memory
    Help me ... Thank you a lot 

    Ok chechk the below method/Events that will download 50 image and fill a List<image> object into memory, you need to add a picturebox1 and button1 to your form, I used my profile pic here on msdn the link you've send didn't work:
    //Global Variables
    List<Image> li = new List<Image>();
    int second = 0; //Form Initaile
    public Captcha()
    InitializeComponent();
    //Async download event
    private void ReadCallback(IAsyncResult asynchronousResult)
    HttpWebRequest request = (HttpWebRequest)asynchronousResult.AsyncState;
    HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(asynchronousResult);
    using (StreamReader streamReader1 = new StreamReader(response.GetResponseStream()))
    li.Add(Image.FromStream(streamReader1.BaseStream));
    pictureBox1.Image = li[0];
    //Download Method for 50 images
    private void DownLoadImages()
    try
    for (int i = 0; i <= 50; i++)
    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(new Uri("https://i1.social.s-msft.com/profile/u/avatar.jpg?displayname=fouad%20roumieh&size=extralarge&version=00000000-0000-0000-0000-000000000000"));
    request.BeginGetResponse(new AsyncCallback(ReadCallback), request);
    catch (WebException ex)
    //Form Load
    private void Captcha_Load(object sender, EventArgs e)
    DownLoadImages();
    And here on button click event we remove element and show the next one into picture box, and if used up all image we call the async download messages again to get a new list of images:
    private void button1_Click(object sender, EventArgs e)
    li.RemoveAt(0);
    if (li.Count > 0)
    { //Show next
    pictureBox1.Image = li[0];
    else
    DownLoadImages();
    Also here a timer event I didn't enable but you can enable to check for the 15 mins and destroy the images list if passed:
    private void timer1_Tick(object sender, EventArgs e)
    second = second + 1;
    int minutes = second / 60;
    if (minutes >= 15)
    li.Clear();
    //Call downloadimages or else...
    Fouad Roumieh

  • Insert Image in SharePoint List & Display Image from SharePoint List using C# Pragmatically

    hi 
    i have a share point custom list with the following columns and its types.
    Title--------------->Single line of test 
    FirstName--------------->Single line of test
    LastName--------------->Single line of test
    Description--------------->multiple line of test
    Link--------------->Hyperlink or Picture
    Image--------------->Hyperlink or Picture
    I've to create a visual web part with the following input fields and which can insert following items in the above list columns
     Title                  asp textbox
    First Name         asp textbox
    Last Name        asp textbox
    Description        asp textbox
    Link                  asp textbox
    Image              file upload control
    Submit             asp button
    when i click browse button for image control in above web part it browses image .jpg,jpeg or .png file from my computer into image input field above and when i click submit button it must be submitted in the Image column in the above list.
    i want to know how can i do that in c# pragmatically. 
    i've another visual web part which should read the image from the list in Image column and display it in image control on the web part.
    like this
    <img id="imgdisplay" runat="server" src="" />
    how can i read image from image column through c# pragmatically.

    Hello,
    You can't directly add picture into "Hyperlink or Picture" column because this column takes URL value and image is binary etc. You can first upload that picture into picture library (create new picture or document library) then add that image link
    into that column.
    To add/edit "Hyperlink or Picture" column, SP provided special class called "SPFieldUrl". Wheer you need to pass URL and description as parameter.
    Refer this link for you ref:
    http://stackoverflow.com/questions/23829576/how-to-decide-sharepoint-url-field-is-set-as-hyperlink-or-picture
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Displaying image from database table.

    Hi All,
       I am very new to Web Dynpro ABAP.
      I am developing an application to display an image in "Image" UI Element.
      For this I have one table consisting of fields image id, image data and image name. here image id is primary key field.
    Now i want to display an image from that table in "Image" UI Element. For this i am using "Filedown load" UI element.
    But by using filedownload ui element i can diaplay image in another new page.
    But my requirement is to display image in the same web page without creating a new one.
    (I want to display the image in "Image" UI element without storing that image in MIME objects.)
    Can anyone help me.
    Thanks in Advance!
    Regards,
    Sreelakshmi.

    What you describe is completely possible.  Since you have the image data (XSTRING) in the context you have everything you need.  You don't need to store the content into the MIME Repository, but you do need to get it somewhere where it has an externally accessible URL.  Remember you need to supply image UI element with a URL.  This URL is processed on the client side by the web browser.  Therefore just giving it a path to the context won't work as that isn't externally accessible.
    I would suggest instead that you place the image content into the ICM cache temporarily.  This lets you basically generate a temporary URL for the image that can be used by the Image UI element. 
    Here is some example code that pushes images into the ICM Cache:
    ****Create the cached response object that we will insert our content into
      DATA: cached_response TYPE REF TO if_http_response.
      CREATE OBJECT cached_response
        TYPE
          cl_http_response
        EXPORTING
          add_c_msg        = 1.
       try. " ignore, if compression can not be switched on
          call method cached_response->set_compression
            exporting
              options = cached_response->co_compress_based_on_mime_type
            exceptions
              others  = 1.
        catch cx_root.
      endtry.
    ****set the data and the headers
      DATA: l_app_type TYPE string.
      DATA: l_xstring TYPE xstring.
          cached_response->set_data( me->gx_content ).
          l_app_type = me->gx_mimetype
      cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                         value = l_app_type ).
    ****Set the Response Status
      cached_response->set_status( code = 200 reason = 'OK' ).
    ****Set the Cache Timeout - 60 seconds - we only need this in the cache
    ****long enough to build the page and allow the Image on the Client to request it.
      cached_response->server_cache_expire_rel( expires_rel = I_CACHE_TIMEOUT ).
    ****Create a unique URL for the object
      DATA: guid TYPE guid_32.
      CALL FUNCTION 'GUID_CREATE'
        IMPORTING
          ev_guid_32 = guid.
      CONCATENATE i_path '/' guid '.' i_format INTO r_url.
    ****Cache the URL
      cl_http_server=>server_cache_upload( url      = r_url
                                           response = cached_response ).

  • XML to display image from userDirectory

    Hi All,
    I've been racking my brain for weeks now trying to work out how to do the following. I can do some of it in Flash and some of in Flex, but I can't do it all in Flex which is frustrating.
    In a nutshell, I want to create an Air App that will allow me to load an XML file from:
    File.userDirectory
    and then display images or SWF's based on the XML data:
    ============
    <?xml version="1.0" encoding="utf-8"?>
    <GALLERY>
    <IMAGE TITLE="shop">test_4.swf</IMAGE>
    </GALLERY>
    ===========
    In Flex 3 I can get the XML file loading from the userDirectory no problem, but I can't work out how to code it to display the images on the stage.
    In Flash I can get the XML file loading from the app's installation directory only, but I can display the images on the stage.
    Here are the two lots of code:
    FLASH (Note: I have a few movieclips holding the images)
    =============
    var myXML:XML;
    var myLoader:URLLoader = new URLLoader();
    myLoader.load(new URLRequest("example.xml"));
    myLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(e:Event):void {
    myXML = new XML(e.target.data);
    //trace(myXML.IMAGE);
    for (var i:int = 0; i<myXML.*.length(); i++) {
      trace("My image number is " + (i+1) + ", it's title is " + myXML.IMAGE[i].@TITLE + " and it's URL is " + myXML.IMAGE[i]);
      var url:URLRequest = new URLRequest(myXML.IMAGE[i]);
      var loader:Loader = new Loader();
      loader.load(url);
      switch (i) {
       case 0 :
        trace(0);
        mc_container_0.addChild(loader);
        break;
       case 1 :
        trace(1);
        mc_container_1.addChild(loader);
        break;
       case 2 :
        trace(2);
        mc_container_2.addChild(loader);
        break;
       default :
        //trace("Not 0, 1, or 2");
    =======================
    and:
    FLEX 3
    =======================
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
    width="768" height="1366" xmlns:comp="*" xmlns:fmtComp="fmtComps.*"
    creationComplete="readXMLContent();" paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0" backgroundColor="#ff00ff">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.utils.ObjectProxy;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var userManualObj:ObjectProxy;
    private function loadModelData(event:ResultEvent):void
    userManualObj=event.result.UserManual;
    private function readXMLContent():void
    var reportDir:File = File.userDirectory.resolvePath("myassets");
    var xmlFile:File;
    var fileStream:FileStream = new FileStream();
    xmlFile = reportDir.resolvePath("example.xml");
    if(xmlFile.exists && xmlFile.size > 0)// Checking if the UserGuide.xml file already exists and the file is not empty
    var stream:FileStream = new FileStream();
    var xml:XML = new XML();
    stream.open(xmlFile, FileMode.READ);
    xml = XML(stream.readUTFBytes(stream.bytesAvailable));
    var strXml:String = xml.toXMLString();
    Alert.show(strXml);
    trace(strXml);
    stream.close();
    ]]>
    </mx:Script>
    <mx:SWFLoader height="93" width="708" id="mc_container_0" />
    <mx:SWFLoader height="393" width="708" id="mc_container_1" />
    <mx:SWFLoader height="293" width="708" id="mc_container_2" />
    </mx:WindowedApplication>
    =========================
    Somehow I need to get the XML data for the file location into each of the SWF loaders in Flex, but I simply don't know how to code it? It's probably very easy for an expert out there.
    Note: I only want to end up with an Air App which will be running locally on my machine.
    The idea is, when the XML file changes with new image data, the Air App will display that new image. The image will be added to the "myassets" folder too.
    If anyone out can point me in the right direction, it would certainly be appreciated.
    Many thanks.
    Tim

    Can anyone help me please?

  • ClasscastException while displaying image from content selector

    Hi,
    My requirement is show an image gif file in jsp, through portal.
    This problem is specific to 8.1 version.
    Created an image type content in BEA repository which i could retrieve from workshop
    content preview correctly, with a rule (named filerule).
    However, when tried to display the same from a simple jsp logic, got classcast
    exception.
    Below is the steps i have done.
    1. import <%@ page import="com.bea.p13n.content.ContentHelper"%>
    2.
    <pz:contentSelector rule="filerule" contentHome="<%=ContentHelper.DEF_DOCUMENT_MANAGER_HOME%>"
    id="ImageDocs"/>
    <es:forEachInArray array="<%=ImageDocs%>" id="anImageDoc" type="com.bea.p13n.content.Content">
    <img src="ShowDoc/<cm:printProperty
    id="anImageDoc" name="identifier" encode="url"/>"
    </es:forEachInArray>
    The server console shows below exception:
    java.lang.ClassCastException
    at jsp_servlet.__index6._jspService(index6.jsp:19)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilte
    r.java:313)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    at com.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter(PageFlowJspFilt
    er.java:208)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
    cherImpl.java:305)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.superForward(Page
    FlowRequestProcessor.java:1304)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor$DefaultHttpRedire
    ctor.forward(PageFlowRequestProcessor.java:1320)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.doForward(PageFlo
    wRequestProcessor.java:1200)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.processForwardCon
    fig(PageFlowRequestProcessor.java:1094)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
    va:279)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowR
    equestProcessor.java:651)
    at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegi
    sterActionServlet.java:527)
    at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActi
    onServlet.java:152)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilte
    r.java:313)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
    cherImpl.java:305)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.superForward(Page
    FlowRequestProcessor.java:1304)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor$DefaultHttpRedire
    ctor.forward(PageFlowRequestProcessor.java:1320)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.doForward(PageFlo
    wRequestProcessor.java:1200)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowR
    equestProcessor.java:638)
    at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegi
    sterActionServlet.java:527)
    at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActi
    onServlet.java:152)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilte
    r.java:313)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:6356)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:3635)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    Also, there is no luck with displaying text content from a file, using printDoc
    tag. Can some one point me to right resource.

    Hi panji,
    I used 7.0 tag lib, just to make use of "printDoc" tag which is available in 7.0version
    only and not in 810. However, i figured out a way to display image using 8.1 (
    of course, by using request.getContextPath() + "/ShowBinary" + imagedoc.getPath())
    But still, i do not find a way to display a doc type file in jsp, which is my
    original problem.
    As per the edocs at http://edocs.bea.com/workshop/docs81/doc/en/core/index.html,
    <cm:getProperty node="<%=doc_node%>" name="file"/>
    should be able to display a txt file but nothing is getting rendred onto jsp.
    ( i have created a book type content in the repo. and file attached is of type
    txt ).
    Can you pls give some clue what i am missing here?
    thanks
    Ramana
    "Panji Aryaputra" <[email protected]> wrote:
    Hi Ramana, could you just use the ShowPropertyServlet to display the
    image
    in jsp? That's what I am using now. Perhaps you have other reasons not
    to
    use it?
    panji.a
    "ramana" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    My requirement is show an image gif file in jsp, through portal.
    This problem is specific to 8.1 version.
    Created an image type content in BEA repository which i could retrievefrom workshop
    content preview correctly, with a rule (named filerule).
    However, when tried to display the same from a simple jsp logic, gotclasscast
    exception.
    Below is the steps i have done.
    1. import <%@ page import="com.bea.p13n.content.ContentHelper"%>
    2.
    <pz:contentSelector rule="filerule"contentHome="<%=ContentHelper.DEF_DOCUMENT_MANAGER_HOME%>"
    id="ImageDocs"/>
    <es:forEachInArray array="<%=ImageDocs%>" id="anImageDoc"type="com.bea.p13n.content.Content">
    <img src="ShowDoc/<cm:printProperty
    id="anImageDoc" name="identifier" encode="url"/>"
    </es:forEachInArray>
    The server console shows below exception:
    java.lang.ClassCastException
    at jsp_servlet.__index6._jspService(index6.jsp:19)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    atweblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
    atweblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
    atweblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    atcom.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilte
    r.java:313)
    atweblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    atcom.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter(PageFlowJspFilt
    er.java:208)
    atweblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    atweblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
    cherImpl.java:305)
    atcom.bea.wlw.netui.pageflow.PageFlowRequestProcessor.superForward(Page
    FlowRequestProcessor.java:1304)
    atcom.bea.wlw.netui.pageflow.PageFlowRequestProcessor$DefaultHttpRedire
    ctor.forward(PageFlowRequestProcessor.java:1320)
    atcom.bea.wlw.netui.pageflow.PageFlowRequestProcessor.doForward(PageFlo
    wRequestProcessor.java:1200)
    atcom.bea.wlw.netui.pageflow.PageFlowRequestProcessor.processForwardCon
    fig(PageFlowRequestProcessor.java:1094)
    atorg.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
    va:279)
    atcom.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowR
    equestProcessor.java:651)
    atcom.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegi
    sterActionServlet.java:527)
    atcom.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActi
    onServlet.java:152)
    atorg.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    atweblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
    atweblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
    atweblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    atcom.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilte
    r.java:313)
    atweblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    atweblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
    cherImpl.java:305)
    atcom.bea.wlw.netui.pageflow.PageFlowRequestProcessor.superForward(Page
    FlowRequestProcessor.java:1304)
    atcom.bea.wlw.netui.pageflow.PageFlowRequestProcessor$DefaultHttpRedire
    ctor.forward(PageFlowRequestProcessor.java:1320)
    atcom.bea.wlw.netui.pageflow.PageFlowRequestProcessor.doForward(PageFlo
    wRequestProcessor.java:1200)
    atcom.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowR
    equestProcessor.java:638)
    atcom.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegi
    sterActionServlet.java:527)
    atcom.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActi
    onServlet.java:152)
    atorg.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    atweblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
    atweblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
    atweblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    atcom.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilte
    r.java:313)
    atweblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    atweblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:6356)
    atweblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:317)
    atweblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    118)
    atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:3635)
    atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    Also, there is no luck with displaying text content from a file, usingprintDoc
    tag. Can some one point me to right resource.

Maybe you are looking for