Image Manipulation from Java to browser

Let me start by saying that I rarely ever post. I try only to do it after I scouring the internet and coming up empty-handed. I have a task that I think should be easy, but of course it is not.
I have an Applet with a JPopupMenu which contains a "Print" JMenuItem. When the item is clicked I use JavaScript via LiveConnect to open a new browser window. My intention is to screen scrape the original page (parse the HTML) and replace any "<OBJECT>" tag with an image of what the Applet is currently showing.
Why?
Well, printing from browsers is buggy at best. I have to support many different OSs and many different versions of Netscape and IE. Some systems can print the HTML page with Applets just fine. Others can do OK and some just crash at the thought.
How?
The idea is that if I recreate a snapshot of the page in a new browser window with images replacing the Applets then the broweser can print that page just fine.
Problem?
I create a BufferedImage in my Applet. The problem comes when I want to tell JavaScript to write the image to the new HTML file. I have seen examples of how this would be done in theory. Has anyone done this?
Background:
I want to use NO server side technologies (i.e. Servlet/JSP) and I do not want to have to sign any files or request any special permissions.
Is there another way to accomplish this goal???
Even if you don't have a good answer, I would appreciate any comments on the matter.
Eric

Generate the image from that html page.What would be the best way to generate an image of the
browser rendered page? This is another issue I have
struggled with.Ok, using a JEditorPane it is possible to render a HTML Page. Like all other Swing components it inherits the paintComponent method from JComponent. Simply generate an offscreen image and get its graphics context. Now you can pass this Graphics object the paintComponent and you get an image of your HTML page.
Just make sure your offscreen image has the correct size. I guess this information is available from the JEditorPane.
Use a PixelGrabber to get the image data and scan itfor the area the
default.gif is placed.How would you use the PixelGrabber to find, or scan,
for a 'default.gif' or multiple 'default.gif's? This
too is an issue I have tried to wrap my mind around.This is the tricky part of it. Using the PixelGrabber you should get an array of pixel values. If you iterate thru this array it should be possible to find the pixel values of the default.gif (at least, if you choose a colr for your default.gif that does not appear in your HTML page incliding the other images).
Now you have to replace those pixels with the pixels you have generated for your applets.
J&ouml;rg

Similar Messages

  • Image Save from Java GUI

    Hi,
    I am currently working on project which is basically development is going on Java Spring and Oracle 10g
    I have a problem when i am calling the procedure from Java GUI
    I am created directory named IMAGE_DIR
    CREATE OR REPLACE PROCEDURE u_rfnd_cnd_test
    (ackno in varchar2, p_name IN u_rfnd_cnd_petition.URCP_IMAGE_NM%TYPE) IS
    v_bfile BFILE;
    v_blob BLOB;
    BEGIN
    INSERT INTO u_rfnd_cnd_petition (URCP_ACK_NO, URCP_IMAGE_NM, URCP_IMAGE)
    VALUES ( ackno,p_name, empty_blob())
    RETURN URCP_IMAGE INTO v_blob;
    v_bfile := BFILENAME('IMAGE_DIR', p_name);
    Dbms_Lob.Fileopen(v_bfile, Dbms_Lob.File_Readonly);
    Dbms_Lob.Loadfromfile(v_blob, v_bfile, Dbms_Lob.Getlength(v_bfile));
    Dbms_Lob.Fileclose(v_bfile);
    COMMIT;
    END;
    When i m calling this procedure from Oracle itself its working fine
    But when calling this procedure from Java GUI with same parameter then i am getting error
    Error :java.sql.SQLException: ORA-22288: file or LOB operation FILEOPEN failed
    The system cannot find the path specified.
    ORA-06512: at "WBCOMTAX.U_RFND_CND_TEST", line 18
    can anyone please help me out ?
    thanks in advance

    Generate the image from that html page.What would be the best way to generate an image of the
    browser rendered page? This is another issue I have
    struggled with.Ok, using a JEditorPane it is possible to render a HTML Page. Like all other Swing components it inherits the paintComponent method from JComponent. Simply generate an offscreen image and get its graphics context. Now you can pass this Graphics object the paintComponent and you get an image of your HTML page.
    Just make sure your offscreen image has the correct size. I guess this information is available from the JEditorPane.
    Use a PixelGrabber to get the image data and scan itfor the area the
    default.gif is placed.How would you use the PixelGrabber to find, or scan,
    for a 'default.gif' or multiple 'default.gif's? This
    too is an issue I have tried to wrap my mind around.This is the tricky part of it. Using the PixelGrabber you should get an array of pixel values. If you iterate thru this array it should be possible to find the pixel values of the default.gif (at least, if you choose a colr for your default.gif that does not appear in your HTML page incliding the other images).
    Now you have to replace those pixels with the pixels you have generated for your applets.
    J&ouml;rg

  • How can I save an image directly from my pc browser to view later on my Ipad?

    Hey all,
    When I attempt to download an image from Firefox on my PC directly into an iCloud Photos shared album, I get the error message: "You can't save here. Please choose another location."  If I navigate to the directory where my iCloud photos are stored within Windows 7, I am able to save the file, but it isn't shared.  What is the proper way to save images from my PC browser to be viewed later on my iPad?  Using Dropbox, this is simple. iCloud, not so much.
    Thanks!
    - CB

    The time should already be shown on the status bar, but you can't add the day and/or date to it - if you would like to have them then you coul leave feedback for Apple : http://www.apple.com/feedback/ipad.html
    If you want to copy an attachment from an email then you can't do that directly from the Mail app. If the email is still on your provider's server then you should be able to read the email on your provider's site via a browser on your computer and save it from there directly on your computer. Otherwise you will need to copy the file from the Mail app to another app on your iPad via the 'open in' function. Do you have an app on your iPad that supports the type of file that you want to copy ? How you then copy the file to your computer will depend upon what the app that you copy it to supports - different apps have different ways of copying their content to/from a computer e.g. via the file sharing section at the bottom of the device's apps tab when connected to iTunes, via your wifi network, dropbox etc

  • Launching Browser from Java when Browser URL is very  long

    Hi,
    I am trying to launch a browser from Java.
    I am doing the following.
    String command = "cmd" + "/c" + "start" + " browserURL";
    Process p = Runtime.getRuntime()exec(command);
    Note: My browserURL is very long.
    Now the browser is invoked. But the URL shown is incomplete and hence
    browser is unable to open the required application.
    Can someone help me in this.
    One way is to increase the buffer size on the command prompt?
    Is there any java command for this?
    Is there any other way to solve this issue.
    Thanks,
    AR

    this is my second time posting this, take note of it. I can't remember where i got it from, but credits go to the person that wrote it. It has helped me out thousands of times!!!
    to use, compile, then call from your program:
    org.newio.utils.BrowserLauncher.openURL("your url here")dfwtc
    package org.newio.utils;
    import java.io.File;
    import java.io.IOException;
    import java.lang.reflect.*;
    public class BrowserLauncher
        private static int jvm;
        private static Object browser;
        private static boolean loadedWithoutErrors;
        private static Class mrjFileUtilsClass;
        private static Class mrjOSTypeClass;
        private static Class macOSErrorClass;
        private static Class aeDescClass;
        private static Constructor aeTargetConstructor;
        private static Constructor appleEventConstructor;
        private static Constructor aeDescConstructor;
        private static Method findFolder;
        private static Method getFileType;
        private static Method makeOSType;
        private static Method putParameter;
        private static Method sendNoReply;
        private static Object kSystemFolderType;
        private static Integer keyDirectObject;
        private static Integer kAutoGenerateReturnID;
        private static Integer kAnyTransactionID;
        private static final int MRJ_2_0 = 0;
        private static final int MRJ_2_1 = 1;
        private static final int WINDOWS_NT = 2;
        private static final int WINDOWS_9x = 3;
        private static final int OTHER = -1;
        private static final String FINDER_TYPE = "FNDR";
        private static final String FINDER_CREATOR = "MACS";
        private static final String GURL_EVENT = "GURL";
        private static final String FIRST_WINDOWS_PARAMETER = "/c";
        private static final String SECOND_WINDOWS_PARAMETER = "start";
        private static final String NETSCAPE_OPEN_PARAMETER_START = " -remote 'openURL(";
        private static final String NETSCAPE_OPEN_PARAMETER_END = ")'";
        private static String errorMessage;
        private BrowserLauncher()
        private static boolean loadClasses()
            switch(jvm)
            default:
                break;
            case 0: // '\0'
                try
                    Class aeTargetClass = Class.forName("com.apple.MacOS.AETarget");
                    macOSErrorClass = Class.forName("com.apple.MacOS.MacOSError");
                    Class osUtilsClass = Class.forName("com.apple.MacOS.OSUtils");
                    Class appleEventClass = Class.forName("com.apple.MacOS.AppleEvent");
                    Class aeClass = Class.forName("com.apple.MacOS.ae");
                    aeDescClass = Class.forName("com.apple.MacOS.AEDesc");
                    aeTargetConstructor = aeTargetClass.getDeclaredConstructor(new Class[] {
                        Integer.TYPE
                    appleEventConstructor = appleEventClass.getDeclaredConstructor(new Class[] {
                        Integer.TYPE, Integer.TYPE, aeTargetClass, Integer.TYPE, Integer.TYPE
                    aeDescConstructor = aeDescClass.getDeclaredConstructor(new Class[] {
                        java.lang.String.class
                    makeOSType = osUtilsClass.getDeclaredMethod("makeOSType", new Class[] {
                        java.lang.String.class
                    putParameter = appleEventClass.getDeclaredMethod("putParameter", new Class[] {
                        Integer.TYPE, aeDescClass
                    sendNoReply = appleEventClass.getDeclaredMethod("sendNoReply", new Class[0]);
                    Field keyDirectObjectField = aeClass.getDeclaredField("keyDirectObject");
                    keyDirectObject = (Integer)keyDirectObjectField.get(null);
                    Field autoGenerateReturnIDField = appleEventClass.getDeclaredField("kAutoGenerateReturnID");
                    kAutoGenerateReturnID = (Integer)autoGenerateReturnIDField.get(null);
                    Field anyTransactionIDField = appleEventClass.getDeclaredField("kAnyTransactionID");
                    kAnyTransactionID = (Integer)anyTransactionIDField.get(null);
                    break;
                catch(ClassNotFoundException cnfe)
                    errorMessage = cnfe.getMessage();
                    return false;
                catch(NoSuchMethodException nsme)
                    errorMessage = nsme.getMessage();
                    return false;
                catch(NoSuchFieldException nsfe)
                    errorMessage = nsfe.getMessage();
                    return false;
                catch(IllegalAccessException iae)
                    errorMessage = iae.getMessage();
                return false;
            case 1: // '\001'
                try
                    mrjFileUtilsClass = Class.forName("com.apple.mrj.MRJFileUtils");
                    mrjOSTypeClass = Class.forName("com.apple.mrj.MRJOSType");
                    Field systemFolderField = mrjFileUtilsClass.getDeclaredField("kSystemFolderType");
                    kSystemFolderType = systemFolderField.get(null);
                    findFolder = mrjFileUtilsClass.getDeclaredMethod("findFolder", new Class[] {
                        mrjOSTypeClass
                    getFileType = mrjFileUtilsClass.getDeclaredMethod("getFileType", new Class[] {
                        java.io.File.class
                    break;
                catch(ClassNotFoundException cnfe)
                    errorMessage = cnfe.getMessage();
                    return false;
                catch(NoSuchFieldException nsfe)
                    errorMessage = nsfe.getMessage();
                    return false;
                catch(NoSuchMethodException nsme)
                    errorMessage = nsme.getMessage();
                    return false;
                catch(SecurityException se)
                    errorMessage = se.getMessage();
                    return false;
                catch(IllegalAccessException iae)
                    errorMessage = iae.getMessage();
                return false;
            return true;
        private static Object locateBrowser()
            if(browser != null)
                return browser;
            switch(jvm)
            case 0: // '\0'
                try
                    Integer finderCreatorCode = (Integer)makeOSType.invoke(null, new Object[] {
                        "MACS"
                    Object aeTarget = aeTargetConstructor.newInstance(new Object[] {
                        finderCreatorCode
                    Integer gurlType = (Integer)makeOSType.invoke(null, new Object[] {
                        "GURL"
                    Object appleEvent = appleEventConstructor.newInstance(new Object[] {
                        gurlType, gurlType, aeTarget, kAutoGenerateReturnID, kAnyTransactionID
                    return appleEvent;
                catch(IllegalAccessException iae)
                    browser = null;
                    errorMessage = iae.getMessage();
                    return browser;
                catch(InstantiationException ie)
                    browser = null;
                    errorMessage = ie.getMessage();
                    return browser;
                catch(InvocationTargetException ite)
                    browser = null;
                    errorMessage = ite.getMessage();
                    return browser;
            case 1: // '\001'
                File systemFolder;
                try
                    systemFolder = (File)findFolder.invoke(null, new Object[] {
                        kSystemFolderType
                catch(IllegalArgumentException iare)
                    browser = null;
                    errorMessage = iare.getMessage();
                    return browser;
                catch(IllegalAccessException iae)
                    browser = null;
                    errorMessage = iae.getMessage();
                    return browser;
                catch(InvocationTargetException ite)
                    browser = null;
                    errorMessage = ite.getTargetException().getClass() + ": " + ite.getTargetException().getMessage();
                    return browser;
                String systemFolderFiles[] = systemFolder.list();
                for(int i = 0; i < systemFolderFiles.length; i++)
                    try
                        File file = new File(systemFolder, systemFolderFiles);
    if(file.isFile())
    Object fileType = getFileType.invoke(null, new Object[] {
    file
    if("FNDR".equals(fileType.toString()))
    browser = file.toString();
    return browser;
    catch(IllegalArgumentException iare)
    browser = browser;
    errorMessage = iare.getMessage();
    return null;
    catch(IllegalAccessException iae)
    browser = null;
    errorMessage = iae.getMessage();
    return browser;
    catch(InvocationTargetException ite)
    browser = null;
    errorMessage = ite.getTargetException().getClass() + ": " + ite.getTargetException().getMessage();
    return browser;
    browser = null;
    break;
    case 2: // '\002'
    browser = "cmd.exe";
    break;
    case 3: // '\003'
    browser = "command.com";
    break;
    case -1:
    default:
    browser = "netscape";
    break;
    return browser;
    public static void openURL(String url)
    throws IOException
    if(!loadedWithoutErrors)
    throw new IOException("Exception in finding browser: " + errorMessage);
    Object browser = locateBrowser();
    if(browser == null)
    throw new IOException("Unable to locate browser: " + errorMessage);
    switch(jvm)
    case 0: // '\0'
    Object aeDesc = null;
    try
    try
    aeDesc = aeDescConstructor.newInstance(new Object[] {
    url
    putParameter.invoke(browser, new Object[] {
    keyDirectObject, aeDesc
    sendNoReply.invoke(browser, new Object[0]);
    catch(InvocationTargetException ite)
    throw new IOException("InvocationTargetException while creating AEDesc: " + ite.getMessage());
    catch(IllegalAccessException iae)
    throw new IOException("IllegalAccessException while building AppleEvent: " + iae.getMessage());
    catch(InstantiationException ie)
    throw new IOException("InstantiationException while creating AEDesc: " + ie.getMessage());
    break;
    finally
    aeDesc = null;
    browser = null;
    case 1: // '\001'
    Runtime.getRuntime().exec(new String[] {
    (String)browser, url
    break;
    case 2: // '\002'
    case 3: // '\003'
    Runtime.getRuntime().exec(new String[] {
    (String)browser, "/c", "start", url
    break;
    case -1:
    Process process = Runtime.getRuntime().exec((String)browser + " -remote 'openURL(" + url + ")'");
    try
    int exitCode = process.waitFor();
    if(exitCode != 0)
    Runtime.getRuntime().exec(new String[] {
    (String)browser, url
    catch(InterruptedException ie)
    throw new IOException("InterruptedException while launching browser: " + ie.getMessage());
    break;
    default:
    Runtime.getRuntime().exec(new String[] {
    (String)browser, url
    break;
    static
    loadedWithoutErrors = true;
    String osName = System.getProperty("os.name");
    if("Mac OS".equals(osName))
    String mrjVersion = System.getProperty("mrj.version");
    String majorMRJVersion = mrjVersion.substring(0, 3);
    try
    double version = Double.valueOf(majorMRJVersion).doubleValue();
    if(version == 2D)
    jvm = 0;
    } else
    if(version >= 2.1000000000000001D)
    jvm = 1;
    } else
    loadedWithoutErrors = false;
    errorMessage = "Unsupported MRJ version: " + version;
    catch(NumberFormatException numberformatexception)
    loadedWithoutErrors = false;
    errorMessage = "Invalid MRJ version: " + mrjVersion;
    } else
    if(osName.startsWith("Windows"))
    if(osName.indexOf("9") != -1)
    jvm = 3;
    } else
    jvm = 2;
    } else
    jvm = -1;
    if(loadedWithoutErrors)
    loadedWithoutErrors = loadClasses();
    suck my balls

  • Setting Theme's Max Whole Image Level from Java

    Hi,
    I'm using JDeveloper11g and I have problems with predefined themes.
    I have developed an application which shows a predefined theme through the <dvt:predefinedTheme> component.
    Because there too many FOIs , I want to set the "Max Whole Image Level" for the theme.
    I know it' is possible from Javascript with function "setMaxWholeImageLevel".
    Is it possible from Java too?
    In Java I have instances of classes UIGeoMap and ThemeFOI, but I don't find methods to set the "Max Whole Image Level" for the theme.
    How can I do it?
    I tried another method too. I put an <af:clientListener> component to listen to page loading. So when page load event fires, a javascript method calls the "setMaxWholeImageLevel" function. The problem is that when page load fires, the object MVThemeBasedFOI (returned from object MVMapView) is null.
    This is the javascript code:
    function test()
    var mapView = null;
    var theme = null;
    var geoMap = AdfPage.PAGE.findComponent('map1');
    mapView = geoMap.getMVMapView();
    if(mapView != null)
    theme = mapView.getThemeBasedFOI('predefinedTheme1');
    if(theme != null)
    theme.setMaxWholeImageLevel(11);
    theme.setMinClickableZoomLevel(11);
    What can I do?
    However, do you know if Java functions, setting "Max Whole Image Level" parameter, will be implemented?
    Thank you,
    Arturo

    Hi,
    I have found a solution for my problem.
    If I call Javascript from backing bean, it works well.
    I have inserted the calling to javascript function test() in method setMap1():
    public void setMap1(UIGeoMap map1)
    this.map1 = map1;
    if(map1 != null)
    ThemeFOI theme = map1.getThemeFOIById("predefinedTheme1");
    if(theme != null)
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExtendedRenderKitService service = (ExtendedRenderKitService)Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
    service.addScript(facesContext, "test();");
    However I have these questions:
    1) What is the best method to work? Is this method better than using an <af:clientListener> component listening to page loading ?
    2) In the next release of JDeveloper, will it be possible to set a predefined theme as a "whole image" from Java ?
    Thank you,
    Arturo

  • Insert Image file from java to ms access database

    Are there any ways to insert image file or any files into microsoft access database and retrieve the file from the database. Guild will be helpful.Thank you.
    regards
    Singaravelan

    The right answer? Don't do it. You should not be putting images in any database.
    Better to write the image to the server's file system and add the path/link to the database instead.
    %

  • USB data manipulation from Java to all OS

    Hello currently I'm developing on a software where I need to detect the USB Device and get access to the data send from the USB Devices. I googled but couldn't find the perfect library for usb for all platform. My program is used by many clients of different platform but I couldn't find solution. Please do you have known any library for this?
    Thanks in advance.

    Tracy,
    <quote>… only on row #40, the internet connection is lost. The only way the user can tell what happened is to look at the entire screen and reverify ALL the data in order to tell what got saved/resaved and what didn't</quote>
    That would be "the only way" if the Java programmers had decided to totally bury the error … what should happen here is the end-user should get a proper error message … no need to re-verify at this point since all bets are off (in fact, nothing should’ve been changed in the database).
    Nonetheless, your concerns regarding the chosen approach are valid … making multiple calls to the database after a Save makes controlling a business transaction rather complex (in an n-tier system) … they should make one call only to the database passing in all the data to be saved … one database transaction … either all changes get applied or none.
    The fact that lots of data may need to be passed in for one Save is of no relevance … if you have to carry 500Kb of data for that screen then, well, you have to do it … 1 bucket of 500Kb or 50 buckets of 10Kb? … it doesn’t really matter as far as the actual transport part is concerned.
    As already answered, one can pass complex types in pl/sql … so one database call per Save would be my first random thought. There are lots of suspect things in here … some things you didn’t mentioned at all … like how is concurrency addressed? … have you/they implemented some sort of optimistic locking mechanism? Of course the architecture of your system won’t be solved in a forum … so, finding a good system/data/Oracle architect on site for the project would be my second random thought.
    PS. One last random thought … fight off that idea of packing and sending large strings (XML or not) … if the data is structured then contemplate XML for no more than few seconds.

  • Problems with image field and java

    Hi, i´m a beginner user of Adobe LiveCycle Designer, i create a form and i fill the text fields with a Java code, but when i try to dinamically assign a image on the image field of my form it doesn´t work, someone have any idea of whats happening or how can i manipulate the image field from Java code? thanks

    Session data will only last as long as the servlet container allows. In most cases (eg Tomcat) this defaults to about 30 minutes, but can be changed. Check that the session timeout configuration in your servlet container hasn't been set to "never timeout".
    Even if it had, I would have expected OutOfMemory errors rather than degrading performance. Although if the max heap size of the JVM has been set to a level higher than the RAM on the machine you could be getting excess page file usage.
    This probably wouldn't put CPU utilization at 99% though.. I suspect this is a code related problem.
    My best guess is one of two reasons:
    1. Somewhere in your code, or someone elses, there is a loop that never ends.
    2. There is a bug in the servlet container.
    I don't know which servlet container you are using, but I have used Tomcat extensively and never seen this behaviour.
    In terms of solving this problem, that's a tough one. I would try running the entire application within a profiling tool to see which threads are clogging up the processor. The Eclipse java IDE has a plugin called Eclipse Profiler which will allow you to track the utilization of code right down to the method level.
    If it were me, I'd be running the entire web application with a profiler like Eclipse Profiler and waiting for it to start clogging, then see who the guilty code is.

  • Possible to read data from a web browser into java?

    Is it possible to read data from a web browser such as IE or Mozilla into a java applet for use and manipulation? If it is, could someone please post some documentation I could look at or a snip-it of code I could use? Thanks.

    This will read the content from a site:
    import java.net.*;
    import java.io.*;
    class Test {
         public static void main(String[] argv) throws Exception {
              URL u = new URL("http://www.google.com");
              URLConnection uc = u.openConnection();
              BufferedReader br = new BufferedReader(new InputStreamReader(uc.getInputStream()));
              String text;
              while( (text = br.readLine()) != null ) {
                   System.out.println(text);
    }

  • Open URL from Java in a new browser tab

    Hi OTN,
    Surprisingly can't find the implimintation.
    In an ADF managed bean I retrieve String url. I need to open a new browser tab with this url.
    Found this thread Open a url in a new window in the backing bean which shows using javascript "service.addScript(facesContext, "window.open(http://www.google.coml)");".
    But in my case in doesn't work. The code is executed, but nothing happens. Maybe because the bean is called from a taskflow inline popup.
    ADF 11.1.1.4
    Thanks.

    Well, I'm afraid that is not an option.
    The goButton is in a table row. There are lots of rows so if I use EL for Destination attribute the URL would be retrieved for each of rows.
    The method of URL retreiving is heavyweight operation which includes calling plsql functions, working with strings and others. So if I do it for each table row my application hungs and then I receive an exception of CPU usage.
    That's why I switched to normal commandButton witch actionListener which retrieves url on click - only once. So I need to open URL from Java.

  • How do I keep my images from moving in browser ?

    Can anyone tell me if there is a solution to keeping multiple images from moving as the size of the browser is made larger or smaller.  I am in the jewelry business and when I have multiple images, and a customer makes the browser window larger or smaller, it of course moves the images out of position and mixes everything up on different lines.  As opposed to a site like Bluenile.com which images stay stationary as the browser window moves.  I did try to make all my images on "one image" in Photoshop and that does seem to do what I want as far as the images go, but then I cant add links to individual pictures within that page.  Please help !

    One of my pages is http://www.milesgoldberg.com/Gentsbandsspecific.html
    This is one when I extend or contract the window, the content gets all mixed up.
    Now look at http://http://www.bluenile.com/wedding-rings/mens-wedding-rings
    If you extend or contract the window, the content stays in place.

  • How to cache images retrieved from MDM on Java WebAS

    Hello Colleagues,
    We have a scenario where we are trying to retrieve image records from the MDM using Java APis. Instead of hitting the DB everytime, is there a way to implement caching? For instance, is it possible to cache the images on the java WebAS and return the path of the images instead of returning the byte stream everytime?
    Thanks and Regards,
    Nisha
    Edited by: Nisha NC on Sep 1, 2009 7:35 AM

    Hi Nisha,
    You can use the Class ObjectCache from the Java API.
    For more information please refer to:
    http://help.sap.com/javadocs/MDM71/current/API/index.html
    Hope this helps,
    Idan

  • Displaying image from BLOB from DB in Browser

    I have a PL/SQL procedure to create a table with a BLOB image, mime type, key, etc. I can use another PL/SQL to load the images into the table. I have a PL/SQL procedure to get an image. I would like to call this procedure and pass the key parameter to display an image in a browser using HTML. Does anyone know how to do this?
    Thanks.

    Use a java servlet to call your stored procedure (using jdbc), this will return the image as a java blob class. You can then write the java blob bytestream to the servlet response object, this should then appear in the browser.

  • Controlling a browser from java

    hello experts,
    i want to open an web dynpro URL in a browser and navigate through the URL , like putting values in the input box and click the buttons from java code .
    Actually it is exactly like an automated test tool in java to navigate and render the given web dynpro URL with the test data given.
    its very please help.
    Regards,
    Karthik

    Hello Karthik,
    I'm using Selenium to do something similar. You can find more information at http://seleniumhq.org/
    The documentation can be found at http://seleniumhq.org/documentation/ and you can find a tutorial implementation for Java at http://seleniumhq.org/documentation/tutorials/
    You can use a new Java Project to start using Selenium, just in case you feel confused.
    I've been using Selenium for some time now, you will learn some tricks during the way. And you'd probably take a look on waitForCondition function, since you'd need some calls in order to wait for webdynpro ajax requests to populate tables (before doing your assertions).
    Hope it helps.
    Regards,
    Daniel

  • I have problems with uploading images to my printing company have the images have been manipulated through CS6 i have saved images as jpeg but the printer company tell me they are not j peg, they will not upload images save from a camera are fine

    I have problems with uploading images to my internet printing company when  the images have been manipulated through CS6 and  i have saved images as jpeg  the printer company tell me they are not j peg,
    but images saved from my phone or camera images that have not been manipulated upload fine, What am i doing wrong?

    Save/Export them as JPG. Photoshop defaults to PSD, so make sure you select JPG and not just rename the file to .jpg.
    There are two ways to save them as JPG: Regular Save as option or Save for Web & Devices
    Take your pick.

Maybe you are looking for