Loading .jpg into from .jsp?

I'm working on a .jsp that generates a graph from database data, and outputs a byte stream that is an .jpg image of the graph. The problem I've ran into, is I'm tring to load a .jpg file for use as a background image, but I cannot seem to find a way to do this. I've tried published ways for doing this in applications, and applets, but I think my case is a bit different... I have no paint() method, so I cannot figure out how to use the drawImage() method. Any ideas?
Thanks in advance.
Brian

Nevermind.. I figured it out.
Thanks
Brian

Similar Messages

  • Cannot Load JPG Files From Canon Powershot S2 IS

    Hi,
    I'm having a problem loading JPG files from my Canon Powershot S2 IS. When I plug the camera into the USB port, I get the Canon Camera/DV Twain Driver with a list of images to import. They are all JPEG images, which is my camera's native format. (I don't think RAW is available on this model.) But when I select an image by double-clicking it, it is imported into Photoshop Album (Starter Edition 3.0), but has somehow been converted to TIFF.
    The problem I have with this is that the TIFF format uses up about 7 time more disk space than the original JPG and I can't afford a new hard drive right now. I simply don't have enough disk space available to import all my images. (I plan to back them up on CD after importing.)
    I see that Edit -> Preferences -> Scanner has an option to save files as JPEG, but Edit -> Preferences -> Camera has no such option.
    Please help! How do I get the images to stay as JPEG?
    Thanks!
    Debbie Hunt

    Answered your other post
    Colin Walls, "Help! PSA SE 3.0 converts my images to TIFF!" #1, 9 Sep 2005 2:28 pm

  • How to load java class from jsp page?

    hi all!
    Does anyone know how to load java class from jsp page?
    I try to load java class from jsp page.
    Is it possible to load java class fom jsp page?
    thanks and have a good day!

    What I mean is How to load/open java class file from jsp page?
    I think we can open Applet from jsp page by using
    <applet code=helloApplet.class width=100 height=100>
    </applet>
    but, how to open java class which is an application made by Frame?
    thanks and have a good day

  • Loading properies file from JSP

    Hi All,
    I am storing both the jsp file and properties file in the same folder. I am using tomcat web container. When I load the JSP into a browser, I am getting file not found exception. Can you please tell me how to resolve this problem. Very urgent.
    Following is the code line I used.
    FileInputStream in= new FileInputStream("currentDate.properties");
    Thanks,
    ---Nagesh

    you can follow this also.
    if ur jsp name is myjsp.jsp then the java file will be myjsp_jsp rite.
    ur property file will be under the classes folder.
    public Properties getProperty(String filename)
              InputStream is = null;
              Properties props = new Properties();       
              ClassLoader classLoader = myjsp_jsp.class.getClassLoader();      
              is = classLoader.getResourceAsStream(filename);
              if(is == null)
                  String message = "Cannot locate property file " + filename + " in the classpath";
                  System.out.println(message);               
              try
                  props.load(is);
              catch (IOException e)
                  String message = "Error reading property file " + filename;             
                  System.out.println(message);     
              finally
                  try
                   is.close();
                  catch(Throwable t)
                   t.printStackTrace();
              if(props.isEmpty())
                  String message = "No properties are defined in " + filename;         
                  System.out.println(message);     
         return props;  
         }

  • Loading JPGs into Movie Clip

    Can anyone help? I am building a site that requires the user
    to click on a button to change a large JPG image in a movie clip.
    The button is part of a small movie clip that contains a text
    number which is the button in question and a thumbnail of the large
    image. I need the button to play when rolled out (to fade out the
    thumbnail image) and I need the large JPG image to be replaced by
    another large JPG image when the button is released. The button
    instance is "Load Image" and the movie clip I want the new JPG to
    load into is called "Holding Pic". Should I put the action script
    on the main timeline? If so, where? Or should I attach the script
    to the button?
    Many thanks.

    This is an article on AS3 but the answer to your question is
    the same. You can find it in the first few paragraphs.
    http://www.adobe.com/designcenter/flash/articles/flacs3it_astimeline.html

  • Loading .JPG`s from Server and Reusing them in .SWF

    Hi everyone!
    Suppose I want to load a .jpg from the server ONCE and then I want to reuse it a dozen times in my .swf...
    How can I achieve this without adding to the .swf`s file size? I was thinking copying its BitmapData a dozen times, but that adds to the file size, right?
    Thanks!

    The weight of the file doesn't change when you load/create content dynamically.
    (I gotta get my post traffic control system working again--too many close calls lately)

  • Why wont jpg images from macbook open on Windows PC?

    I have loaded jpg images from my nikon camera into iphoto on macbook pro.
    No editing was done.
    Then i copied then to a usb and attempted to open on a windows pc .
    They wont open in either windows or photoshop on windows pc.
    Can you help please?
    Many thanks
    Dell.

    You may be burning the disk as a data CD. Make sure that you're burning the disk as an Audio CD (iTunes Burning preference). You can also burn an MP3 CD if your tracks are in MP3 format and your player will handle an MP3 disk.
    Hope this helps.

  • Exporting from JSP into PowerPoint or an Image file

    I am having a JSP file, the data from which need to be exported into a PowerPoint presentation. Can you suggest me some code examples of exporting the data from JSP to PowerPoint or rather to an image (.gif or .jpg), this image file can then be inserted into the PowerPoint.
    I tried exporting to Excel and from there Copy+Paste but this leaves a chance of modifying the data, the other option I used was exporting the data into a .pdf file, but we are currently having Acrobat Reader 4.0 in which there is no Graphic selection tool unless I use the full version.
    My first preference is to export the data into PowerPoint or if that does not work then into an image file.
    Would be helpful if you have some code examples to look at or if you can guide to some useful sites that can help me in achieving this.
    Thanks in advance...

    For exporting the data into .ppt files try the following.
    Set the content type for the jsp as "application/ms-powerpoint"
    and whatever HTML u have would be sent to the ppt.

  • Applet not loading from jsp

    using weblogic server 6.1 sp2, solaris 8 mu7, netscape 6.2.1
              the compiled applet UploadScreenshots.class is bundled into a web app
              file named roach.war and resides in the following directory in the war
              file:
              WEB-INF/classes/roach/web/applets/UploadScreenshots.class
              trying to deploy applet from jsp with following plugin definition in
              jsp:
              <jsp:plugin type="applet"
              code="roach.web.applets.UploadScreenshots.class"
              codebase="/classes/"
              height="200" width="500"
              jreversion="1.3"
              nspluginurl="http://java.sun.com/products/plugin/1.3/plugin-install.html"
              iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-131-win32.cab">
              <jsp:fallback>
              <font color=#FF0000>Sorry, cannot run java applet!!</font>
              </jsp:fallback>
              </jsp:plugin>
              when executing the jsp from the browser, get the following error
              message when browser attempts to load the applet:
              Exception: java.lang.ClassNotFoundException:
              roach.web.applets.UploadScreenshots.class
              however, when codebase attribute is removed from plugin element
              definition and the compiled applet class (and its directory) is moved
              to the same directory as the jsp, the applet loads and works without
              any problems!
              what's up???
              

    joseph,
              thanks for the follow up. i still was not able to load the applet from
              the web-inf directory so i just jarred up the applet, stuck the jar
              file in the jsp directory, and added the archive attribute to the
              jsp:plugin element. everything loads and works fine. maybe i'll
              revisit loading applets from the web-inf directory later. thanks
              again.
              rick
              "Joseph Nguyen" <[email protected]> wrote in message news:<[email protected]>...
              > Rick,
              >
              > Take a look here real quick:
              > http://e-docs.bea.com/wls/docs70/jsp/trouble.html#error-plugin. It's not
              > much, but if it doesn't help please open a case with BEA Support via
              > WebSupport portal here http://support.bea.com/welcome.jsp as there is no
              > existing issue in our bug db right now with the jsp:plugin tag.
              >
              > Regards,
              > Joseph Nguyen
              > BEA Support
              >
              > "rick bryant" <[email protected]> wrote in message
              > news:[email protected]...
              > > using weblogic server 6.1 sp2, solaris 8 mu7, netscape 6.2.1
              > >
              > > the compiled applet UploadScreenshots.class is bundled into a web app
              > > file named roach.war and resides in the following directory in the war
              > > file:
              > > WEB-INF/classes/roach/web/applets/UploadScreenshots.class
              > >
              > > trying to deploy applet from jsp with following plugin definition in
              > > jsp:
              > > <jsp:plugin type="applet"
              > > code="roach.web.applets.UploadScreenshots.class"
              > > codebase="/classes/"
              > > height="200" width="500"
              > > jreversion="1.3"
              > >
              > nspluginurl="http://java.sun.com/products/plugin/1.3/plugin-install.html"
              > >
              > iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-131-win32.cab"
              > >
              > > <jsp:fallback>
              > > <font color=#FF0000>Sorry, cannot run java applet!!</font>
              > > </jsp:fallback>
              > > </jsp:plugin>
              > >
              > > when executing the jsp from the browser, get the following error
              > > message when browser attempts to load the applet:
              > > Exception: java.lang.ClassNotFoundException:
              > > roach.web.applets.UploadScreenshots.class
              > >
              > > however, when codebase attribute is removed from plugin element
              > > definition and the compiled applet class (and its directory) is moved
              > > to the same directory as the jsp, the applet loads and works without
              > > any problems!
              > >
              > > what's up???
              

  • How can i load file into database from client-side to server-side

    i want to upload file from client-side to server-side, i use the following code to load blob into database.
    if the file is in the server-side, it can work, but if it in the client-side, it said that the system cannot find the file. i think it only will search the file is in the server-side or not, it will not search the client-side.
    how can i solve it without upload the file to the server first, then load it into database??
    try
    ResultSet rset = null;
    PreparedStatement pstmt =
    conn.prepareStatement ("insert into docs values (? , EMPTY_BLOB())");
    pstmt.setInt (1, docId);
    pstmt.execute ();
    // Open the destination blob:
    pstmt.setInt (1, docId);
    rset = pstmt.executeQuery (
    "SELECT content FROM docs WHERE id = ? FOR UPDATE");
    BLOB dest_lob = null;
    if (rset.next()) {
    dest_lob = ((OracleResultSet)rset).getBLOB (1);
    // Declare a file handler for the input file
    File binaryFile = new File (fileName);
    FileInputStream istream = new FileInputStream (binaryFile);
    // Create an OutputStram object to write the BLOB as a stream
    OutputStream ostream = dest_lob.getBinaryOutputStream();
    // Create a tempory buffer
    byte[] buffer = new byte[1024];
    int length = 0;
    // Use the read() method to read the file to the byte
    // array buffer, then use the write() method to write it to
    // the BLOB.
    while ((length = istream.read(buffer)) != -1)
    ostream.write(buffer, 0, length);
    pstmt.close();
    // Close all streams and file handles:
    istream.close();
    ostream.flush();
    ostream.close();
    //dest_lob.close();
    // Commit the transaction:
    conn.commit();
    conn.close();
    } catch (SQLException e) {

    Hi,
    Without some more details of the configuration, its difficult to know
    what's happening here. For example, what do you mean by client side
    and server side, and where are you running the upload Java application?
    If you always run the application on the database server system, but can't
    open the file on a different machine, then it sounds like a file protection
    problem that isn't really connected with the database at all. That is to
    say, if the new FileInputStream (binaryFile) statement fails, then its not
    really a database problem, but a file protection issue. On the other hand,
    I can't explain what's happening if you run the program on the same machine
    as the document file (client machine), but you can't write the data to the
    server, assuming the JDBC connection string is set correctly to connect to
    the appropriate database server.
    If you can provide some more information, we'll try to help.
    Simon
    null

  • How do I load a picture from the clipboard (either Windows clipboard or Labview clipboard) into image data that can then be processed in Labview?

    I want to load a picture from the Windows clipboard (and if not possible, then from the Labview clipboard) into actual numerical image data so that it can be processed in lab view. When I'm at the main screen where I can add controls, I see a section of controls called "Vision" in the tool bar where all the different controls can can be added from. When I go to the control called "Image" and put that on my form, and then look at the flowchart/blockdiagram programing window to see what inputs and outputs it has, I only see one output, and no inputs. And when I right click on it, I see NO way to load an image into the Image control. PLEASE help me.
    Message Edited by Ben321 on 11-09-2008 04:32 PM

    Hi Ben,
    National Instruments has an image processing software called Vision and although I am not completely sure, I think the controls that you found in the control pallet are used in conjunction with the software. Depending on what kind of image processing you want to conduct in LabVIEW, you might want to consider purchasing that product.
    If cost is an issue, there are functions in LabVIEW which allows you to take in image files and process them. However, please keep in mind that the capabilities are limited.
    Images should be loaded onto LabVIEW not via the clipboard but through loading it from folders or directories. (There might be a way to and so if you find a way please let me know! I would like to know myself =D) If you open the function pallet by right clicking on the block diagram, in the programming folder you should find a directory called "Graphic and Sound". There, you'll find functions in which allows you to process images.
     In the "Graphic Type" directory there should be a function called Read JPEG file.vi. There are also others which allows you to read png and bmp files. Please note that there are functions which write as well. Set a file path on the block diagram and inside the "Grahic and Sound" there is a "Picture Function" directory and inside there, there should be a function called "Draw Flattened Pixmap.vi" That changes the image into a format where you can process on LabVIEW. Inside the "Picture Function" directory there are several functions which allows you to process the specified image. Play around with it and see how it goes. And don't forget to Write the file in the end to save any changes.
    I hope this helps
    National Instruments Japan
    Applications Engineer Taiki Hoshi

  • How to load data into an ods from multiple info sources.

    hi all...
    i am given a task to load data into an ods from 3 infosources ...
    can someone plz give me the flow .
    thank u in advance..

    Hi Hara Pradhan,
    You have to create 3 update rules by giving the 3 different infosources while creating each update rule. And u have to create the infopackages under each infosource. with this u can load the data to the same data target from multiple info sources.
    Hope it helps!
    Assign points if it helps!

  • I am able to download all the album I bought from itune store. The album contains 13 songs but 4 of them would not load up into my ipod. How can I fix that?

    I am not able to download all the album I bought from itune store. The album contains 13 songs but 4 of them would not load up into my ipod. An error code will pop up notified me that "my Ipod cannot convert some of the file" How can I fix that?

    Hi there mayway3000,
    You may find the troubleshooting steps in the article below helpful.
    iPod does not play content purchased from the iTunes Store
    http://support.apple.com/kb/TS1510
    -Griff W.

  • How to Load the data from excel file(Extension is .CSV) into the temp.table

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Hello Sachin,
    You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
    Instead of copy values into forms you can save them in your temporary table.
    Kind regards,
    Alex
    If someone's helpful or correct please mark it accordingly.

  • How to load the data from excel file into temprory table in Forms 11g?

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Declare
        v_full_filename         varchar2(500);
        v_server_path           varchar2(2000);
        v_separator             VARCHAR2(1);
        v_filename              VARCHAR2(400);
        filename                VARCHAR2 (100);
        v_stop_load             varchar2 (2000);
        v_rec_error_log         varchar2(4000);
        v_error_log             varchar2(4000);
        ctr                     NUMBER (12);
        cols                    NUMBER (2);
        btn                     number;
        RES                     BOOLEAN;   
        application             ole2.obj_type;
        workbooks               ole2.obj_type;
        workbook                ole2.obj_type;
        worksheets              ole2.obj_type;
        worksheet               ole2.obj_type;
        cell                    ole2.obj_type;
        cellType                ole2.OBJ_TYPE;
        args                    ole2.obj_type;
        PROCEDURE olearg
        IS
        args   ole2.obj_type;
        BEGIN
        args := ole2.create_arglist;
        ole2.add_arg (args, ctr);                                
        ole2.add_arg (args, cols);                                   
        cell := ole2.get_obj_property (worksheet, 'Cells', args);
        ole2.destroy_arglist (args);
        END;
    BEGIN
    v_full_filename := client_get_file_name(directory_name => null
                                     ,file_name      => null
                                     ,file_filter    => 'Excel  files (*.xls)|*.xls|'  
                                                                            ||'Excel  files (*.xlsx)|*.xlsx|'                                                                 
                                     ,message        => 'Choose Excel file'
                                     ,dialog_type    => null
                                     ,select_file    => null
    If v_full_filename is not null Then
    v_separator := WEBUTIL_CLIENTINFO.Get_file_Separator ;
    v_filename := v_separator||v_full_filename ;
    :LOAD_FILE_NAME := substr(v_filename,instr(v_filename,v_separator,-1) + 1);                                
    RES := Webutil_File_Transfer.Client_To_AS(v_full_filename,"server_path"||substr(v_filename,instr(v_filename,v_separator,-1) + 1));     
    --Begin load data from EXCEL
    BEGIN
        filename := v_server_path||substr(v_filename,instr(v_filename,v_separator,-1) + 1); -- to pick the file
        application := ole2.create_obj ('Excel.Application');
        ole2.set_property (application, 'Visible', 'false');
        workbooks := ole2.get_obj_property (application, 'Workbooks');
        args := ole2.create_arglist;
        ole2.add_arg (args, filename); -- file path and name
        workbook := ole2.get_obj_property(workbooks,'Open',args);
        ole2.destroy_arglist (args);
        args := ole2.create_arglist;
        ole2.add_arg (args, 'Sheet1');
        worksheet := ole2.get_obj_property (workbook, 'Worksheets', args);
        ole2.destroy_arglist (args);
        ctr := 2;                                                     --row number
        cols := 1;                                                -- column number
        go_block('xxx');
        FIRST_RECORD;  
        LOOP       
                --Column 1 VALUE --------------------------------------------------------------------
            olearg;
            v_stop_load := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            :item1 := v_stop_load;
            cols := cols + 1;                                                      
              --Column 2 VALUE --------------------------------------------------------------------
            olearg;
            :item2 := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            cols := cols + 1;
            --<and so on>
        ole2.invoke (application, 'Quit');
        ole2.RELEASE_OBJ (cell);
        ole2.RELEASE_OBJ (worksheet);
        ole2.RELEASE_OBJ (worksheets);
        ole2.RELEASE_OBJ (workbook);
        ole2.RELEASE_OBJ (workbooks);
        ole2.RELEASE_OBJ (application);
    END;
    --End load data from EXCELPlease mark it as answered if you helped.

Maybe you are looking for

  • No reciever could be determined in BPM scenario

    Dear Friends,     I am working on BPM scenario i.e sending the delivery idoc from one ECC to another ECC using XI,In XI side after one hour it has to be updated, for this scenario I am uisng Recieve-wait-send step types are using. I have done all the

  • How to run a customized form in Oracle Apps (EBS)

    Oracle Apps - 11.5.10.2 on Linux As 4.5 Oracle Database Version : 9.2.0.6.0 on HP UX Itanium 11.23 Through (EBS)Apps can i run a Cutomized Form (Developed with D2K) , just like we run a report after defining a Concurrent Program for the same. If yes

  • 2008 Service Pack to Fix Enterprise Login

    Post Author: CalvinMiranda CA Forum: Crystal Reports Any idea when this Service Pack is due out in 2008?

  • [sound] ALSA - X-Fi Titanium - emu20k2 - not recognized by alsa

    Hi, I can't get my X-Fi working, neither with oss nor with alsa ! I tried several things with no success, searched a lot among forums but couldn't find anything that worked. Here are some details : Recognized as a pci card : [noar@arch-noar rc.d]$ ls

  • Send numeric limit data from TestStand sequence to Accesss database

    I use the "None" adapter to perform numeric limit testing on results from expression steps, but when I enable saving the report to an Access database the Name of the parameter is not shown. I noticed that when I use the multiple numeric limit step th