Display image Blob of jsf page without using servlet

Hi all

I would like to ask you if there is no solution to display image blob inside the jsf page without using servlet

because I don't think its right to go to the servlet and get the value of the image from there.

BR

his does not work

This helps not at all. All I can say is that the example works and you must check your configuration. Someone is preferable to obtain the sample running D o they you can watch in the most expensive configuration.

Some configurations are case-sensitive, so you should double check your spelling.

Timo

Tags: Java

Similar Questions

  • Display image datebase jspx page without using Servlet

    Hello

    I use jdeveloper 11.1.1.6.0

    I want to display image from database, I know that I can use Servlet for that of of Adeel's Technology Blog: load and display images from database column of type Blob in Oracle Jdeveloper 11 g R2 ADF

    but in the Servlet should I manually set the connection even if I don't want to manually set the connection. How can I avoid to define the connection manually? or is there a way to display the database without using a Servlet?

    Habib

    There is no need to do so. Still a servlet (alone!)   will be sufficient. Read my blog http://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-1/ part 1-3 for your solution. Part 4 is the rear port for Jdev 11.1.1.7.0, but it will take place in 11.1.1.6.0 too.

    Timo

  • How to display the arraylist < list > jsf page

    HII all,.

    I'm having a jspx page where I want to display the value from a bean class Get accessor...

    the Get accessor returns a list Arrarylist

    and I want to display the list of table in its entirety on the jspx page when it is loaded.

    The method is: -.

    public ArrayList < list > getMyList() {}
    myList = getDocumentProperties ();
    return myList;
    }

    How to navigate the entire list on jsf... ??

    any idea... !!

    Thank you

    You can use or in an ADF Faces page to iterate over the items returned by the method getMyList() of the bean:

    
      
    
    

    If you want to browse the internal lists, then use a nested iterator:

    
      
        
      
    
    

    Dimitar

  • Adobe Stock image to a web page without going through an application of dnuee first?

    I can upload an image Adobe Stock on my desk and then directly to a web page, or does it go through a dnuee first application?

    Thank you

    You can download it to your desktop and do what you want with it. You don't need to use Adobe products.

  • Scan multiple pages without using desktop

    Hello

    I bought a desire 110 wireless to in a different place than my desktop. Sometimes I need to scan several pages, but it seems that the only way to accomplish a pdf normal multipage instead of several pdf files each containing a single page is to use the scan on the desktop software. If there is no solution to this - using applications in the iPhone or on the scanner itself, my purchase is a big disappointment, because it is extremely inefficient to have to run back and forward from the office to the printer for each new page. If it wasn't a wireless device I would have understood that there is no such feature, but it is a wireless, made to be placed anywhere in the House! I think I must have forgotten something because it may be possible that HP have overlooked this basic usability.

    I spent hours searching this site and the Internet to find a solution, so tips in the right direction would be much appreciated.

    Hello

    Only devices with an automatic document feeder to scan multiple pages into a single file from the front panel of the unit.

    For the specific model such a task is possible only through the HP software and not from the front of the unit.

    Kind regards

    Shlomi

  • Display image BLOB

    I have a table that contains BLOBs photo. Simple question: How can I show them in Apex?

    Hello

    Here is a tutorial to show blobs in apex 3.1: http://www.oracle.com/technology/obe/apex/apex31nf/apex31blob.htm

    Herald tiomela
    http://htendam.WordPress.com

  • Can I use presentation grid in visual JSF page designer?

    Hello dear...

    I use Jdeveloper 11 g and 10 g.
    When I tried to use the JSF Visual Editor (from the component palette), and when I drag any control to the page I found that the command will in the upper left corner of the page
    and I even can not move the control to another place on the page by mouse.
    the Visual JSF designer seems to use flow layout for the page. (same as using flow layout in swing applications).

    The question is whether I can change the page layout to be available to grid instead of fluid layout? (to get around any control anywhere in the page.)

    Note that in netbeans 6.1, when you design the JSF page, you have 2 options for the layout, the grid presentation and the fluid layout and you can choose as you like.
    This function is located in jdeveloper 11?

    If not, can someone tell me no work around to design JSF pages without using the fluid layout?

    Thanks in advance

    Samy

    Published by: user10653280 on November 29, 2008 13:30

    We do not provide absolute positioning for JSF application - it is a bad practice, since it fills your JSF page with the CSS code and create applications that are not portable between different screen/monitor resolutions - so instead, us use flow layout and provide a much richer set of elements of page layout.
    See the info here:
    http://download.Oracle.com/docs/CD/E12839_01/Web.1111/b31973/af_orgpage.htm#CACCBCCI

  • Included JSP/JSF page did not get rendered on the main page of JSF

    Hello

    I have a main JSF Page in which I have 2 pages included JSF.
    A JSF page has only an image and other JSF page has some data read from VO.

    When I run the main JSF page, the image gets displayed (first JSF included) but not the content of the second JSF page.

    When I run the second (page embedded JSF) individually, it shows the data of the VO.

    The two JSF pages are included with < jsp: include > tag.

    I missed something?

    Thanks for any help.
    Sameer

    Hello

    When you use jsp: including, the contents of the page fragment link container must be added to the parent PageDef file.

    Frank

  • External JSF pages to view the contents of the URL

    Hello

    Is it possible for a JSF page that uses the PanelPage component and the ADF controls to provide menus, etc to actually allow an HTML page (accessed via a URL to an external site/application) to be displayed somewhere in the JSF page?

    For example, clicking on a menu item to an external HTML page causes the page currently displayed in a frame or similar in the JSF page?

    I tried the FrameBorderLayout control and control Frame to try to integrate a picture to display such a page through the establishment of goals for a menu item, but that doesn't seem to work. At least not when in a PanelPage. It works within a basic JSP page.

    I would have thought that it would be possible for an application of JSF to incorporate content from other sites/servers HTML as if a part of the application. Even if it meant the definition of 'wrapper' of some pages effectively sort the link in the JSF application within its rules of navigation.

    Or am I missing something?

    Gene

    Hello

    You can use an iFrame wrapped in a f: tag verbatim. This will make

    Frank

  • How can I get through forms without using my mouse?

    On a form web (as a survey), I used to be able to tab on the 'submit' button, press ENTER, and submit the page. Who stopped working some time over 2 months, probably with an update of Firefox.

    I need to have people to do a series of short surveys, a typed RESPONSE per page. (They must be structured in this way for a moment that we do). Previously, people could type in their response, to 'other' tab and press return, which would load the next page. This seems to have stopped working, and I can't find a way to access the next page without using the mouse. Back and forth between typing and clicking on are super annoying and slow people down, by our much less precise time measurements. How can I return this feature?

    Seems to work for me. I did this quick form with Google Drive: https://docs.google.com/forms/d/1b493Op_imKXg8Q_GNMmRquuvCutZzyQ0RuQbgKRPD6A/viewform?usp=send_form
    Can you give an example of this form does not work?

  • How to import pictures in the excel worksheet without using the generation of reports

    Dear friends

    I want to know how to import the image or the image file in excel worksheet without using the generation of reports...

    Please come with suggestions or the code example

    Concerning

    Knani

    Please go through the link below

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/3638

    Even if a Subvi is absent I think it will be useful for you.

    Concerning

    Rajesh nawal

  • Get the current name of the page without the aid of a bean

    Hello, everyone!

    If I would get the current name of the page to a page, I'd do something like this:
    #{bean.currentPageName}
    @SessionScoped
    @Named
    public class Bean
    {
        public String getCurrentPageName()
        {
            return FacesContext.getCurrentInstance().getViewRoot().getViewId();
        }
    }
    But my question is: is it possible to get the name of the current page directly from the xhtml page without using a bean? Is it something related to it or information available to the page itself? If so, how can I access it?

    Thank you in advance.

    Marcos

    Use the same semantics in the page:

    #{facesContext.viewRoot.viewId}
    
  • How to retrieve the image BLOB from database and display the image in rtf file using the Oracle XML Desktop 5.6.2 publication server?

    Hi all

    Here I have the image BLOB in the database files,

    I want to show the image to PDF using file to rtf using Oracle Xml Desktop Publisher,

    Hi all

    I found the solution for reading Image BLOB of data base & display in Pdf format.

    (1) read the image from DB.2) and then copy the picture using IO. UtilsCopy method to copy the picture

    (3) then encode with base64 converter then you will get the tag XML with Base64 as string then placed in your XML Code & preview the output, you will find the image

    Photo = (BlobDomain) currentRow.getAttribute ("Image");

    ByteArrayOutputStream OutputStream = new ByteArrayOutputStream();

                        Byte [] imageByte;
                          Byte [] b = null;
                        try {}
                        
                            IOUtils.copy (photo.getInputStream (), outputStream);
                            BS = outputStream.toByteArray ();
                            outputStream.flush ();
                            System.out.println("==="+BS.) Length);
                            Encoded byte [] is Base64.encodeBase64 (bs).;
                            encodedString = new String (encoded);
  • Servlet not showing do not image BLOB Oracle in JSF

    Hi forum.

    I have a table in oracle in which i m storage photos in a BLOB on the field and extension (mime type) of the file in a field of varchar2. I can store image successfully. but I want the stored image to display in a graphicimage BLOB tag. I searched the net and found it must be done using servlet. the code I used is as follows. but I get a null pointer exception. I know I should get these exceptions but I don't know how to deal with since there is little vague rest in each site, I searched. so I opted to ask the forum.

    Here is the code for my jsp page
                                         .
                                         .
                                         .
         <h:graphicImage value="/DisplayImage"/> 
                                        .
                                        .
     
    Web.XML is amended as follows
                  <servlet>
      <servlet-name>DisplayImage</servlet-name>
      <servlet-class>imageDisplay.DisplayImage</servlet-class>
    </servlet>
    <servlet-mapping>
      <servlet-name>DisplayImage</servlet-name>
      <url-pattern>/DisplayImage</url-pattern>
    </servlet-mapping>
              
    the servlet itself...
       package imageDisplay;
    
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.pa.utils.HibernateUtils;
    import org.hibernate.Session;
    public class DisplayImage extends  HttpServlet{
      
      public void doGet(HttpServletRequest request,HttpServletResponse response)  throws ServletException, IOException 
      {
     
                Session hibernateSession = null;
              hibernateSession = HibernateUtils.currentSession();
              Connection connection;
              connection = hibernateSession.connection();
              
              Statement st1;
      try{  
            Class.forName("oracle.jdbc.driver.OracleDriver");
             st1=connection.createStatement();
             ResultSet rs1 = st1.executeQuery("select APP_FILE from EMPLOYEE_DETAILS where EMP_ID = 2");  //APP_FILE IS THE BLOB FIELD
             System.out.println("----------------#@$#@$$%^$%^%&^*^&*(&(*&^%$#$%@#%^%^%&*&^*$^&#%^$%@#$%@#$--------------------");
           String imgLen="";
           
           while(rs1.next())
                     {
           imgLen = rs1.getString(1);
        
      
                      int len = imgLen.length();   //THIS IS LINE 35 WHERE ERROR IS EMERGED...............
                     byte [] rb = new byte[len];
                     InputStream readImg = rs1.getBinaryStream(1);
                     int index= readImg.read(rb, 0, len);  
      
                System.out.println("index----#@$#@$$%^$%^%&^*^&*(&(*&^%$#$%@#%^%^%&*&^*$^&#%^$%@#$%@#$------------"+index);
                response.reset();
                response.setContentType("image/jpg");
                response.getOutputStream().write(rb,0,len);
                response.getOutputStream().flush();
           }
      
      st1.close();
      response.getOutputStream().close();
     } catch (Exception e){
      e.printStackTrace();
      }
      }
    }     
    
    
      
    the error I get is
     index----#@$#@$$%^$%^%&^*^&*(&(*&^%$#$%@#%^%^%&*&^*$^&#%^$%@#$%@#$------------
    java.lang.NullPointerException
         at imageDisplay.DisplayImage.doGet(DisplayImage.java:35)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
         at java.lang.Thread.run(Unknown Source)
    Bundle of thanks in advance for reading my problem waterproofed and your help I'm looking desperately for

    Published by: jaykio77 on January 11, 2012 04:09

    Published by: jaykio77 on January 11, 2012 04:12

    Instead of copying and pasting code, take the time to read on the works of JDBC. Yes it will take a long time, but when you acquire the knowledge you prevent you having to dump your problems on other people, in this case a lot of foreign friends.

    Copy the following code:

    imgLen = rs1.getString(1);
    
                      int len = imgLen.length();   //THIS IS LINE 35 WHERE ERROR IS EMERGED...............
                     byte [] rb = new byte[len];
                     InputStream readImg = rs1.getBinaryStream(1);
    

    Does really not much sense. This assumes that the first position in the result set is a string and a BLOB.

    Meanwhile, break your problem. What you want to do is to read a blob of a result set. Right? That's it, who cares that a servlet is involved, which is not what you are having problems with. You can not read the blob.

    It is essential to realize that you can refine your google search for «blob of resultset» java Guess what appeared to be the first time for me:

    http://www.java2s.com/code/Java/database-SQL-JDBC/GetBLOBdatafromresultset.htm

  • Display an image BLOB in a browser

    OK, I have a table that stores the JPEGs as BLOB Oracle. What I want to do is to read one of these BLOB and display it on a web page. Seems simple.

    The problem is that I can not all first convert the BLOB to a file with UTL_FILE. The image will not be considered as the whole of the content of the page either, it must be in line with any other text content. Our system has a back end of PL/SQL that generates all the HTML code. The Oracle 10 g, pl/sql database is 10.2.0.4.0. The only other technology that can be used is javascript on the client side.

    Is it still possible? I have been stood up by this problem for some time and would appreciate any help I can get.

    Thank you

    Our system has a back end of PL/SQL that generates all the HTML code.

    East - the APEX or based HTMLDB? If so, you can use a procedure such as

    CREATE OR REPLACE procedure download_my_file(p_file in number) as
        v_mime  varchar2(255);
        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 file_subjects
            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="' || v_file_name || '"');
            -- close the headers
                    owa_util.http_header_close;
            -- download the BLOB
            wpg_docload.download_file( Lob_loc );
    end download_my_file;
    

Maybe you are looking for