Display Images using READ_IMAGE_FILE in 10g forms

Hello all, i have a simple question that I'm trying to resolve really quick.
I've created a field on a form in 10g forms that is of IMAGE type. I've given it a name and has given it a FILE_TYPE of GIF.
I've put some code in a POST-QUERY trigger of a block that calls the READ_IMAGE_FILE command, where I enter the filename, file_type, and block.item name. When I leave the path off the image name, forms runtime acts like it cannot find it. I get an FRM message displayed at runtime that says it "Cannot read image file". However, if I put the full path (like something pointing to a hard-coded directory on my C drive where the image file resides), the image displays fine at runtime.
I added the images to my JAR file where I have other images stored so they get opened at runtime under the ORACLE_HOME/forms/java directory. I was thinking that when I gave the filename, runtime would know to pull it out of there. But obviously, that's not what is happening.
Has anyone got ideas on what I could do to get the READ_IMAGE_FILE to display the image without hard-coding a path in?
Any help is appreciated!
Regards,
Chris

Here are some things to check:
1) Alll the images in the JAR file should have the same extension
2) In formsweb.cfg, include the JAR file in the ARCHIVE parameter and set imageBase=codebase
3) In registry.dat, leave iconpath blank and set iconextension=gif
4) In your READ_IMAGE_FILE call, use URL as the file type and don't use the extension on the file name. So if the image in your JAR is my_picture.gif, it would be something like READ_IMAGE_FILE('my_picture','URL','myblock.my_image_item');
If it still doesn't work, enable the Java console and when it comes up, enter the number 5 in the console to enable the highest level of logging. Then have a look at the console to see if the JAR is getting downloaded and where it's attempting to read the image from.

Similar Messages

  • How to  upload and display image using bsp application

    hi
    I  just wants to know that
    1- how to  upload image from BSP page with attachment into sap server .?
    2-how to display image in to BSP page(webpage).
    thanks

    Hello Gupta Prashant,
    Just to upload and display an image, import image in MIME repository. Not only still images but also flash files can also be uploaded in the MIME repository. Once you import the image in it, use normal html code for image call;
    <img src = "file.jpg/gif" width=  height=>
    Besides it, if your requirement is to store the image in the database and fetch it based on specified field-name, then you have to go for BLOBs i.e Binary Large Object, using this you can also store images, videos, pdfs, applications in the database.
    MBLOB - Medium BLOBs store videos and pdfs,
    LBLOB  - Large BLOBs store movie files and applications.
    You have got 2 ways to use it; some databases store BLOB objects into themselves and some store the path of the BLOB object maintained on the FTP server.
    You can also implement it in ABAP;
    read the following link and practice the tutorial;
    [ Use of MIME Types|http://help.sap.com/saphelp_45b/helpdata/en/f1/b4a6c4df3911d18e080000e8a48612/content.htm]
    also check this
    [TYPES - LOB HANDLE|http://help.sap.com/abapdocu/en/ABAPTYPES_LOB_HANDLE.htm]
    And looking at your question, in order to upload an image, you can make use of FILEUPLOAD tag provided by HTMLB.
    Step 1: FILEUPLOAD provides a browse button to choose desired image file.
    Step 2: Store that image in database using BLOBs.
    Step 3: Retrieve the image using normal select query and display it on the screen.
    Hope it helps you,
    Zahack

  • How to display image using from open dialog box?

    I've developed a program that can display image by named the file that I want to display in my program.
    But how can I display an image from an Open Dialog Box?
    I attch here with my program.
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.filechooser.*;
    public class SuDisplayTool6 extends JFrame implements InternalFrameListener,ActionListener
    JTextArea display1;
    JDesktopPane desktop;
    JInternalFrame displayWindow;
    JInternalFrame listenedToWindow;
    static final String SHOW = "Show Image";
    static final int desktopWidth = 800;
    static final int desktopHeight = 600;
    private static final int kControlX = 88 ;
    private DrawingPanel panel;
    public SuDisplayTool6(String title)
    super("Internal Frame");
    desktop = new JDesktopPane();
    desktop.putClientProperty("JDesktopPane.dragMode","outline");
    desktop.setPreferredSize(new Dimension(desktopWidth, desktopHeight));
    setContentPane(desktop);
    addMenu();
    createDisplayWindow();
    desktop.add(displayWindow);
    Dimension displaySize = displayWindow.getSize();
    displayWindow.setSize(desktopWidth, displaySize.height);
    protected void createDisplayWindow()
    JButton b1 = new JButton("Show Image");
    b1.setActionCommand(SHOW);
    b1.addActionListener(this);
    display1 = new JTextArea(3,30);
    display1.setEditable(false);
    JScrollPane textScroller = new JScrollPane(display1);
    textScroller.setPreferredSize(new Dimension(200,75));
    textScroller.setMinimumSize(new Dimension(10,10));
    displayWindow = new JInternalFrame("Header Graph",true,false,true,true);
    JPanel contentPane = new JPanel();
    contentPane.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
    contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
    contentPane.add(Box.createRigidArea(new Dimension(0,5)));
    contentPane.add(textScroller);
    b1.setAlignmentX(CENTER_ALIGNMENT);
    contentPane.add(b1);
    displayWindow.setContentPane(contentPane);
    displayWindow.pack();
    displayWindow.show();
    protected void createListenedToWindow()
    listenedToWindow = new JInternalFrame("Image",true,true,true,true);
    listenedToWindow.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    listenedToWindow.setSize(800,450);
    panel = new DrawingPanel();
    listenedToWindow.setContentPane(panel);
    public void internalFrameClosing(InternalFrameEvent e)
    public void internalFrameClosed(InternalFrameEvent e)
    listenedToWindow = null;
    public void internalFrameOpened(InternalFrameEvent e)
    public void internalFrameIconified(InternalFrameEvent e)
    public void internalFrameDeiconified(InternalFrameEvent e)
    public void internalFrameActivated(InternalFrameEvent e)
    public void internalFrameDeactivated(InternalFrameEvent e)
    public void actionPerformed(ActionEvent e)
    if (e.getActionCommand().equals(SHOW))
    if (listenedToWindow == null)
    createListenedToWindow();
    listenedToWindow.addInternalFrameListener(this);
    desktop.add(listenedToWindow);
    listenedToWindow.setLocation(desktopWidth/2 - listenedToWindow.getWidth()/2,
    desktopHeight - listenedToWindow.getHeight());
    listenedToWindow.show();
    else
    public static void main(String[] args)
    JFrame frame = new SuDisplayTool6("Su Display Tool");
    frame.addWindowListener(new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    frame.pack();
    frame.setVisible(true);
    private void addMenu()
    JMenuBar menuBar;
    JMenu menu, submenu;
    JMenuItem menuItem;
    final JFileChooser fc = new JFileChooser();
    fc.addChoosableFileFilter(new ImageFilter());
    menuBar = new JMenuBar();
    setJMenuBar(menuBar);
    menu = new JMenu("File");
    menuBar.add(menu);
    menuItem = new JMenuItem("Open...");
    menu.add(menuItem).addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    int returnVal = fc.showOpenDialog(SuDisplayTool6.this);
    menuItem = new JMenuItem("Save");
    menu.add(menuItem);
    menuItem = new JMenuItem("Save As...");
    menu.add(menuItem).addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    int returnVal = fc.showSaveDialog(SuDisplayTool6.this);
    menuItem = new JMenuItem("Close");
    menu.add(menuItem);
    menu.addSeparator();
    menuItem = new JMenuItem("Exit");
    menu.add(menuItem).addActionListener(new WindowHandler());
    menu = new JMenu("Edit");
    menuBar.add(menu);
    menu = new JMenu("View");
    menuBar.add(menu);
    menuItem = new JMenuItem("Zoom In");
    menu.add(menuItem);
    menuItem = new JMenuItem("Zoom Out");
    menu.add(menuItem);
    menu.addSeparator();
    submenu = new JMenu("Header");
    menuItem = new JMenuItem("CDPX");
    submenu.add(menuItem);
    menuItem = new JMenuItem("SX");
    submenu.add(menuItem);
    menuItem = new JMenuItem("CX");
    submenu.add(menuItem);
    menu.add(submenu);
    menu = new JMenu("Help");
    menuBar.add(menu);
    menuItem = new JMenuItem("About");
    menu.add(menuItem).addActionListener(new WindowHandler());
    private class WindowHandler extends WindowAdapter implements ActionListener
    public void windowClosing(WindowEvent e)
    System.exit(0);
    public void actionPerformed(ActionEvent e)
    if(e.getActionCommand().equalsIgnoreCase("exit"))
    System.exit(0);
    else if(e.getActionCommand().equalsIgnoreCase("About"))
    JOptionPane.showMessageDialog(null,"This program is written by Nenny Ruthfalydia.","About",JOptionPane.PLAIN_MESSAGE);
    class DrawingPanel extends Panel
    final ImageIcon imageIcon = new ImageIcon("image8.jpg");
    Image image = imageIcon.getImage();
    public void paint (Graphics g)
    g.drawImage(image, 10, 10, this);

    so much wrong with this post...
    a) use the code tags to format the code. Now it is an unreadable mess
    b) scriptlets in your JSP. I don't even want to look at that mess. Learn how to combine servlets and JSPs to create clean, readable and maintainable code in which view logic and business logic are separated. The rule: no java code in your JSP, only tags and EL expressions (learn about JSTL).
    So you get a blank screen. When you do "view source" in your browser, do you see anything there? If nothing, check if you are behind a proxy server. The solution to a post of not too long ago was that the blank screen was being caused by faulty proxy server settings (the user figured it out himself, I don't know what was done to solve it).
    If all this fails you will have to do some debugging magic using your favorite IDE. It will probably be something stupid you are overlooking in the code. It is annoying, but debugging code that does not work is a big part of your job. Better get good at it.

  • Displaying Image using JLabel in swings

    I am not understanding how to display a image in swing using JLabel Component.
    I am writing in the following manner:
    // importing necessary packages
    in init() method
    public void init()
    Container cp= getContentPane()
    JLabel jl=new JLabel("Image",new ImageIcon("<image>.gif"),JLabel.CENTER);
    cp.add(jl);
    applet is running and only label msg is displaying but not the image.
    Please help me so that i can solve this problem.where the image is to be placed??and how it has to be included?
    Please provide me the solution.

    cp.add(new JLabel("Image",new ImageIcon(new java.net.URL (getCodeBase(),"Test.gif")),JLabel.CENTER));

  • Error while using webutil in 10g forms

    Hi All,
    I followed all the steps as given in the webutil user guide, in order to use webutil functionality in my forms 10g. Even then, I am getting an error message while trying to open a file from the client machine.
    oracle.forms.webutil.file.FileFunctions bean not found WEBUTIL_FILE.FILE_SELECTION_DIALOG_INT will not work.
    I need a solution to this problem urgently.
    Thanks,
    M.Banerjee

    Hi,
    look at the Jinitiator console if the webutil jar file gets downloaded. If this is downloaded, which indicates that it can be found on the server, check the implementation in Forms. What this says is that the bean cannot be found, which however should be the case if webutil is configured correctly.
    Frank

  • How to display image using Carousel in ADF using BLOB column DB

    Hello everyone ,
    I tried creating a Carousel component in ADF do display an image , but it seems to be not working .
    This is what i tried .
    1 ) Created an empty page .
    2) From data control drag and drop view object ( one of the column in DB is blob which saves the image ) as Carousel .
    3 ) Drag and drop the image over Carousel component ,
    Now what should be the source for the image ?? from expression builderi tried giving #{item.Image} images are not picking up .
    Could you please advice .
    --Keerthi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Keerthi,
    You cannot display a BLOB as image as it is. You need to convert them to display in your UI.
    Check out this blog on how to use a servlet to convert the blob into image and display in the page.
    http://tompeez.wordpress.com/2011/12/16/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-3/
    -Arun
    P.S : Always mention your JDev version and the technologies used.

  • Help with displaying image using OpenGL ES sample code - image size prb

    I am using some sample code that currently displays an image 256x256 pixels. The code states the image size must be a power of 2. I have tried an image 289x289 (17^2) and it displays a square the same size as the 256x256 with a white background. I want an image 320x320 displayed. Should be obvious for people familiar with OpenGL. Here is the code which displays the image and rotates:
    - (void)setupView
    // Sets up an array of values to use as the sprite vertices.
    const GLfloat spriteVertices[] = {
    -0.5f, -0.5f,
    0.5f, -0.5f,
    -0.5f, 0.5f,
    0.5f, 0.5f,
    // Sets up an array of values for the texture coordinates.
    const GLshort spriteTexcoords[] = {
    0, 0,
    1, 0,
    0, 1,
    1, 1,
    CGImageRef spriteImage;
    CGContextRef spriteContext;
    GLubyte *spriteData;
    size_t width, height;
    // Sets up matrices and transforms for OpenGL ES
    glViewport(0, 0, backingWidth, backingHeight);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    glOrthof(-1.0f, 1.0f, -1.5f, 1.5f, -1.0f, 1.0f);
    glMatrixMode(GL_MODELVIEW);
    // Clears the view with black
    //glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
    glClearColor(255, 255, 255, 1.0f);
    // Sets up pointers and enables states needed for using vertex arrays and textures
    glVertexPointer(2, GL_FLOAT, 0, spriteVertices);
    glEnableClientState(GLVERTEXARRAY);
    glTexCoordPointer(2, GL_SHORT, 0, spriteTexcoords);
    glEnableClientState(GLTEXTURE_COORDARRAY);
    // Creates a Core Graphics image from an image file
    spriteImage = [UIImage imageNamed:@"bottle.png"].CGImage;
    // Get the width and height of the image
    width = CGImageGetWidth(spriteImage);
    height = CGImageGetHeight(spriteImage);
    // Texture dimensions must be a power of 2. If you write an application that allows users to supply an image,
    // you'll want to add code that checks the dimensions and takes appropriate action if they are not a power of 2.
    if(spriteImage) {
    // Allocated memory needed for the bitmap context
    spriteData = (GLubyte *) malloc(width * height * 4);
    // Uses the bitmatp creation function provided by the Core Graphics framework.
    spriteContext = CGBitmapContextCreate(spriteData, width, height, 8, width * 4, CGImageGetColorSpace(spriteImage), kCGImageAlphaPremultipliedLast);
    // After you create the context, you can draw the sprite image to the context.
    CGContextDrawImage(spriteContext, CGRectMake(0.0, 0.0, (CGFloat)width, (CGFloat)height), spriteImage);
    // You don't need the context at this point, so you need to release it to avoid memory leaks.
    CGContextRelease(spriteContext);
    // Use OpenGL ES to generate a name for the texture.
    glGenTextures(1, &spriteTexture);
    // Bind the texture name.
    glBindTexture(GLTEXTURE2D, spriteTexture);
    // Speidfy a 2D texture image, provideing the a pointer to the image data in memory
    glTexImage2D(GLTEXTURE2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GLUNSIGNEDBYTE, spriteData);
    // Release the image data
    free(spriteData);
    // Set the texture parameters to use a minifying filter and a linear filer (weighted average)
    glTexParameteri(GLTEXTURE2D, GLTEXTURE_MINFILTER, GL_LINEAR);
    // Enable use of the texture
    glEnable(GLTEXTURE2D);
    // Set a blending function to use
    glBlendFunc(GL_ONE, GLONE_MINUS_SRCALPHA);
    // Enable blending
    glEnable(GL_BLEND);
    // Updates the OpenGL view when the timer fires
    - (void)drawView
    // Make sure that you are drawing to the current context
    [EAGLContext setCurrentContext:context];
    glBindFramebufferOES(GLFRAMEBUFFEROES, viewFramebuffer);
    glRotatef(direction * 3.0f, 0.0f, 0.0f, 1.0f);
    glClear(GLCOLOR_BUFFERBIT);
    glDrawArrays(GLTRIANGLESTRIP, 0, 4);
    glBindRenderbufferOES(GLRENDERBUFFEROES, viewRenderbuffer);
    [context presentRenderbuffer:GLRENDERBUFFEROES];
    }

    +I am using some sample code that currently displays an image 256x256 pixels. The code states the image size must be a power of 2. I have tried an image 289x289 (17^2)+
    The phrase "a power of 2" refers to 2^x so your choices above 256 are 512, 1024 etc.
    The texture size has nothing to do with the displayed size - OGL will stretch or shrink your texture to fit the size of the polygon you're displaying it on. I recommend you scale your image to 256x256 and work on make the polygon the size you want and work on your image quality from there.
    You can work on the size or orientation of the poly surface to make it larger but OGL doesn't support setting a model to a screen image size or anything like that. That sounds more like a Quartz or CoreGraphics kind of thing if you want to set an exact screen size to the pixel.
    HTH,
    =Tod
    PS You can display your code correctly by using { code } (without the spaces) on either side of your code block.

  • Display image using JPanel

    i have got buffered image from webcam using jmf. i want to display it on JPanel.
    i override paint() but it doesn't display as it captures
    when i maximize window it then displays
    urgent help needed

    The bounds of your JPanel may be incorrect. You should try the setBounds(int x, int y, int width, int height) method on it.
    Please past your code for more help :p

  • Cannot read image file in oracle 10g forms, getting error frm-47100

    I'm unable to read the image from the file location. But If I do re-save via MS-Paint the same image then I'm able to load successfully. I want to load image directly instead of re-save.  Error getting like "frm-47100 Cannot read image file".
    Need your co-operation to solve this issue.
    Thanks in advance!
    declare
      tiff_image_dir varchar2(80):=('D:\IMAGE\');
      photo_filename varchar2(80);
    begin
      photo_filename:=tiff_image_dir||:IMAGE_NO||'.JPG';
      if :image_no is null then
      :Image_no :=:UID_NO;
      end if;
      read_image_file(photo_filename,'JPG','image');
      WRITE_IMAGE_FILE('output.tif','TIFF','g_image_info.image',maximize_compression,original_depth)
    end;

    Hi Sindhu,
    By default any operating system file extension starts after the dot. So in this case when it says 2 dots it will think there is something wrong.
    RajeshALex

  • Using webutil_file_transfer in 10G forms

    I am looking to upload a pdf blob from a table in the database to a physical directory on the the application server. Then use web.show_document to display the the pdf in a browser to the user.
    I currently use the following to display the pdf.
    webutil_file_transfer.DB_To_Client
    webutil_file_transfer.Client_To_AS
    web.show_document
    This work works well for users at work on our intranet. But this is considerably slower when users connect to the system from home over the internet. Is there a way with webutil_file_transfer or an oracle system function to move the pdf from the database to the application server?

    use either
    start c:\temp\A8020023122.pdfor
    rundll32.exe url.dll, FileProtocolHandler c:\temp\A8020023122.pdfinstaed of cmd /c, these two are not blocking.
    Edited by: aweiden on 24.10.2008 22:03

  • Load and display image using CDC

    Hi everyone,
    Please help. I'm new to java. I need a simple routine to load and display an image from the file system into a CDC app on windows mobile 5. I'm usin creme 4.1.
    Thanx in advance

    Use the following as a guide:
    1. Get the image (path below must be absolute):
    public static Image getImage(String filename) throws ScanException {
    Image img = null;
    // Read paths from properties file
    StringBuffer buf = new StringBuffer("\\");
    buf.append(ScanUtility.getPathImages());
    buf.append("\\");
    buf.append(filename);
    buf.append(".jpg");
    File dataFile = new File(buf.toString());
    if(!dataFile.exists())
    throw new ScanException("Cannot locate the file:\n" + dataFile.getAbsolutePath());
    img = Toolkit.getDefaultToolkit().createImage(buf.toString());
    return img;
    2. Create a class to display the image (pass in the image, above):
    ImagePanel class source:
    import java.awt.*;
    import java.awt.image.*;
    public class ImagePanel extends Panel {
    private Image image = null;
    private Image scaledImage = null;
    private boolean imageComplete = false;
    public ImagePanel(Image img) {
    image = img;
    scaledImage = image.getScaledInstance(200, -1, Image.SCALE_DEFAULT);
    prepareImage(scaledImage, this);
    // Override the paint method, to render the image
    public void paint(Graphics g) {
    if(imageComplete) {
    g.drawImage(scaledImage, 0, 0, this);
    // Override imageUpdate method, to prevent repaint() from trying
    // to do anything until the image is scaled
    public boolean imageUpdate(Image img, int infoFlags, int x, int y, int w, int h) {
    if(infoFlags == ImageObserver.ALLBITS) {
    imageComplete = true;
    repaint();
    return super.imageUpdate(img, infoFlags, x, y, w, h);
    public void flush() {
    image.flush();
    scaledImage.flush();
    image = null;
    scaledImage = null;
    }

  • Problem in displaying images using JLabel in Netbeans

    hi all,
    i am trying to display an image on JLabel in Netbeans.The image is visible in the design view but not displayed in the runtime.Can anyone help me out with suggestions???

    Duplicate - answer here http://forum.java.sun.com/thread.jspa?threadID=5153605&messageID=9578626#9578626

  • How to display image?

    Hi all,
    How to display image from the database table in the adobe form by using web dynpro abap?
    I want to display image in the adobe interactive form by using web dynpro abap.
    Please help me.
    Regards,
    srini

    Hi Srini,
    If you go through the article you might have seen the following piece of code
    *** Send the values back to the node
      lo_el_z_if_test_cv->set_static_attributes(
        EXPORTING
          static_attributes = ls_z_if_test_cv ).
    " here ls_z_if_test_cv has the image in XSTRING format which has beeen retrived using METHOD get_bds_graphic_as_bmp of CLASS cl_ssf_xsf_utilities
    " In  your case you need to just use the select query n fetch it from your table; ( provided your image is store in XSTRING format )
    How is your image stored in your database table ?
    Regards,
    Radhika.

  • Having trouble displaying images on a page in APEX through IE.

    I'm trying to conditionally display images (used as toggle buttons) in a tabular report in APEX. This is for our Benefits application where an employee can include or exclude his/her dependents from the plan. For each row, in one column I want to show only 'Include' button if an individual is not already a member, and in another column show only 'Remove' button if already included. I'm using the button images as links and passing information to a page process.
    I was able to come up with the SQL query which works perfectly fine in Firefox. But the images won't display in Internet Explorer. Does anyone have any idea how to make this work in IE?
    Below is my query. This code will display 'Include in plan' image only if the member is not already added to the plan. If 'Y' is the result of the query, then the member is already included and no image is displayed. Otherwise display the image. Pass the member_id to an application item and process the record in a Before Header process.
    select elected_member_id, member_type, last_name, first_name, middle_name, gender,date_of_birth,student_flag,trunc(months_between(sysdate ,date_of_birth)/12) AGE,
    decode((select 'Y'
    from eben_elected_plan_info epi
         where plan_name not in ('Delta', 'Vision', 'HEALTH_FLEX', 'DEP_FLEX')
         and epi.elected_member_id = emi.elected_member_id
         and transaction_type <> 'END'), null,'<a href="f?p=&APP_ID.:70:&SESSION.::::F_APP_MEMBER_INCLUDE:'||elected_member_id||'<img src="&WORKSPACE_IMAGES.include.png"></a>') elected_member_id_include,
    elected_member_id elected_member_id_exclude
    from eben_elected_members_info emi
    where emp_person_id = :f_app_person_id
    and member_type <> 'Employee'

    I was able to resolve this issue by creating the SQL statement from scratch in IE. It then recognized the images.

  • 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

  • How to find which all workbook is using Database function ( User Defined)

    Hi All, Is it possible to find out which all workbook is using Database function( User Defined). Thanks,

  • Item level ststus not showing search list for agent inbox

    Hi, while selecting item level ststus in agent inbox it is not showing records in search list.so many records existed in system based on item leval ststuses. currently working on crm 7.0 can u please help me out to solve this issue Thanks & Regards k

  • Crashing and Freezing

    I just downloaded the latest version of Firefox and ever since it's impossible to surf the internet without crashes/freezing. It's ridiculous. I've consulted all the articles about dealing with this problem, ran my anti-virus to make sure it wasn't a

  • Help with building a form

    Hello, I'm pretty new to LifeCycle and don't even know if this is the right program I should be using to do this but I thought I'd give it a shot. The branch I work for in my company has been doing media planning up in Saskatchewan for about a year n

  • How do I go wireless?

    My ethernet port was recently fried and was told my best bet was to just start using wireless internet. So I went out a bought a Belkin USB card and a Belkin router. I got the network card set up, but when setting up the router, I was told to connect