Applet.getImage(URL url) question

Hi,
I experienced delays of up to several hundreds milliseconds for calling Applet.getImage(URL url) when accessing an image the first time.
The API states that "This method always returns immediately, whether or not the image exists." but this does not seem to be correct. In contrast, Applet.getToolkit().getImage() returns immediately.
What are the differences between these two methods?
What caching mechanisms (browser, SUN cache) are running behind the scenes?
Used environment: IE6/Java1.5, IE6/Java1.6, Firefox2/Java1.6 ...all running under WinXP.
Thank you so much!

I have had exactly the same problem with Applet.getImage.
In previous JRE versions, Applet.getImage returned immediately,
but this has apparently changed (I don't know at which version).
I had to rewrite my program to use Applet.getToolkit().getImage
- then the program worked as before...
Looks like a bug to me.
H�vard Tveite

Similar Messages

  • Applet.getImage(URL) problem

    My computer is installed with JRE7. I found that calling getImage from applet will send the request twice to the server. The request being send to server is http://server:8000/abc?id=100.
    The first request received by server is http://server:8000/abc%3fid%3d100. [which is failed]
    The second request received by server is http://server:8000/abc?id=100. [which is ok]
    My code simply call the following line once:
    theApplet.getImage (theApplet.getCodeBase(), "abc?id=100");
    Is this a bug in the Java plugin?

    I have had exactly the same problem with Applet.getImage.
    In previous JRE versions, Applet.getImage returned immediately,
    but this has apparently changed (I don't know at which version).
    I had to rewrite my program to use Applet.getToolkit().getImage
    - then the program worked as before...
    Looks like a bug to me.
    H�vard Tveite

  • Getting error while using getImage(URL, filename) and imageUpdate()

    Hello Everyone,
    I am trying to create an image and upload it in an applet. I have kept the image file in the same directory as of the HTML and java-applet file. I have used the getImage(URL, filename) abstract method to do so. The image is not getting uploaded .... PLEASE HELP .... Please find the code attached below.
    import java.awt.*;
    import java.awt.image.*;
    import java.applet.*;
    /*<applet code="ImageCreation_applet" width=1200 height=400>
    </applet>*/
    public class ImageCreation_applet extends Applet implements ImageObserver
         //     Image image1;
              Image image2;
              String s="";
              String image_name="img2";
              public void init()
                        setBackground(Color.yellow);
         //               Canvas c=new Canvas();
         //               image1=c.createImage(40, 40);
                        image2=this.getImage(this.getDocumentBase());
              public void paint(Graphics g)
                   //     g.drawImage(image1, 50, 50, this);
                        g.drawImage(image2, 0, 0, this);
                        g.drawString(s, 300, 300);
              public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h)
                        if((flags & SOMEBITS) != 0)
                                  repaint(x, y, w, h);
                        else if((flags & ABORT) != 0)
                                  s="ERROR";
                                  repaint();
                        return (flags & (ALLBITS|ABORT)) == 0;
         } I am continuously getting the ERROR String.... PLEASE HELP

    troy.cos wrote:
    i dont have enough time to look closer right now, but im pretty sure that:
    flags & ABORTneeds to be two & not one... so like:
    flags && ABORT
    Nope, that isn't the problem here. & is the correct one to use.
    "&" in this case is a bitwise and, while "&&" would be the boolean shortcut and, which does an entirely different thing.

  • Web Applet using URL type not appearing as desired

    Have created a web applet using URL type (for google maps). Although it works fine, the appearance is not acceptable. It is very elongated and appears to be in an unacceptable size/dimension for users.
    Does anybody know a way to configure the size? Any suggestions ??
    Thanks.

    Hi,
    here it goes
    well skipping my sleep did find me some solution for your query :) see if it help
    use the below code inside the applet for TYPE as HTML under Web Applet HTML.
    You can find details about the below script from Google Maps API Section.
    Currently I have only configured Ship to country field but you can add the more field accordingly.
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=abcdefg&sensor=true_or_false" type="text/javascript"></script>
    <script type="text/javascript">
    var shipTo='%%%Ship_To_COUNTRY_Country%%%';
    var geocoder = null;
    var map = null;
    document.onreadystatechange=function() {
    if (GBrowserIsCompatible()) {
    map = new GMap2(document.getElementById("map_canvas"));
    map.setCenter(new GLatLng(37.4419, -122.1419), 13);
         if(shipTo!=''){
              geocoder = new GClientGeocoder();
              showAddress(shipTo);
    map.setUIToDefault();
    function showAddress(address) {
    if (geocoder) {
         geocoder.getLatLng(address,function(point) {
              if (!point) {
                   alert(address + " not found");
              } else {
                   map.setCenter(point, 13);
                   var marker = new GMarker(point);
                   map.addOverlay(marker);
                   marker.openInfoWindowHtml(address);
    </script>
    ]div id="map_canvas" style="width: 500px; height: 300px"></div]
    Note:Above line < was replaced by ] due to issue with forum rendering
    The only Issue I came across with this Code is it doesn't work on FireFox, well as always Cross Browser Issue....
    Good nite :)
    Regards,
    Deepak H Andeli
    Edited by: Deepak H Andeli on Jan 29, 2010 12:19 AM

  • Background picture to famous "ImageTest" applet - Is it supid Question?

    I would like to see what Pholser will say about this. :)
    Is this a dumest question or what ?
    Thanks in advance
    basisdba
    ------------------ Repeated----------------------------------------
    Hi to all,
    I am not sure if you could help on this one or not, but
    will be happy to see any responding on this :))
    This is the example that I have worked on:
    http://java.sun.com/applets/other/ImageTest/index.html
    I am trying to add a sold background to this, is this possible?
    Thanks in advance
    Regards,

    Hi Sam and all of you,
    Sorry for the delay I am very bussy daily as SAP adminstrator,
    if you know what I mean :)
    You both are right but with some minor corrections.
    You guys are all great after all...
    I attached ImageTest.java demo sample with this modification to the
    background only...I am trying to add extra code into it to allow
    NOT only BLUE/RED swap color but also some more colors, how can I do
    that? How can I add black, green, yellow and so on...(stupid nah :) )
    Why in the hell "Java Tech.." make the color defining so hard? :)
    Or it would be nice to have a 16 color table to choose from...
    Thanks again to all of you and I also rewarded your points based
    on the most recent "white house" logic! :)))))
    Regards,
    ------------------------------- Start of the code
    /*Modified only ImageTest.java Demo
    import java.lang.Math.*; // for Spray
    import java.awt.*; // note to self - imports CURSOR class
    import javax.swing.*; // for ui
    import java.awt.image.*; // for images
    import java.applet.*; // for sounds
    import java.awt.event.*; // for events
    import java.net.*; // URL
    import java.net.URL;
    import java.util.Vector;
    import java.awt.geom.*; // for Line2D
    import java.util.*; // used for the Vector in the flood fill method
    import java.util.StringTokenizer;
    public class ImageTest extends Applet {
    //Init
    public void init()
    // Image bg0 = applet.getImage(applet.getDocumentBase(),"images/bg0.gif");
    setLayout(new BorderLayout());
    add("Center", new ImagePanel(this));
    add("North", new ImageHelp());
    setVisible(true);
    public String getAppletInfo()
    return "A simple image manipulation tool.";
    class ImageHelp extends Panel {
    public ImageHelp() {
    setLayout(new GridLayout(6, 1)); //Grid 5 Row and 1 column
    //m
    // add(new Button("Move"));
    //m
    add(new Label("test",
    Label.CENTER));
    add(new Label("Image Move: < > ^ v, or with [L]eft/[R]ight/p/[D]own",
    Label.CENTER));
    add(new Label("Image Resize: +/-",
    Label.CENTER));
    add(new Label("Color Filter: T key",
    Label.CENTER));
    add(new Label("Change Alpha: (Shift)+/-",
    Label.CENTER));
    add(new Label("Rotate Image: (Shift)<> or (Shift)[L]eft/[R]ight",
    Label.CENTER));
    System.out.println("");
    class ImagePanel extends Panel
    Applet applet;
    public ImagePanel(Applet app) {
    applet = app;
    setLayout(new BorderLayout());
    Panel grid = new Panel();
    grid.setLayout(new GridLayout(1, 1)); //first(row), second (column)
    add("Center", grid);
         Image bg0 = applet.getImage(applet.getDocumentBase(),"images/bg0.gif");
         Image fg0 = applet.getImage(applet.getDocumentBase(),"images/ff001.gif");
         grid.add(new ImageCanvas(applet, fg0, bg0, 1.0));
         setBounds(0, 0, 20, 20);
    class ImageCanvas
    extends Canvas
    implements ImageObserver, KeyListener, MouseListener,
    MouseMotionListener, FocusListener {
    double hmult = 0;
    int xadd = 0;
    int yadd = 0;
    int xprev = 0;
    int yprev = 0;
    int imgw = -1;
    int imgh = -1;
    int xoff = 0;
    int yoff = 0;
    int scalew = -1;
    int scaleh = -1;
    boolean focus = false;
    boolean usefilter = false;
    static final int numalphas = 9;
    int alpha = numalphas - 1;
    static final int numrotations = 8;
    int rotation = 0;
    ImageFilter colorfilter;
    ImageFilter alphafilters[] = new ImageFilter[numalphas];
    RotateFilter rotfilters[] = new RotateFilter[numrotations];
    Image origimage;
    Image curimage, backimage;
    Applet applet;
         public BufferedImage currentImage, oldImage, tempImage, storedImage;
    Image bg0, bg1, bg2, bgImage;
         public URL URL_STRING;
    private int picNo = 0;
    public void init()
    try {
         bg0 = new ImageIcon(new URL(URL_STRING +"images/bg0.gif")).getImage();
         bg1 = new ImageIcon(new URL(URL_STRING +"images/bg1.gif")).getImage();
         catch (Exception exc)
         {//imgLoad = "Image failed to load";
    public ImageCanvas(Applet app, Image img,Image bg0,double mult) {
    applet = app;
    origimage = img;
    backimage = bg0;
    hmult = mult;
    pickImage();
    setBounds(0, 0, 100, 100);
    addMouseListener(this);
    addMouseMotionListener(this);
    addKeyListener(this);
    addFocusListener(this);
    //1.1 event handling
    public void focusGained(FocusEvent e) {
    focus = true;
    repaint();
    public void focusLost(FocusEvent e) {
    focus = false;
    repaint();
    public void keyPressed(KeyEvent e) {
    public void keyTyped(KeyEvent e) {
    char key = e.getKeyChar();
    switch(key)
    case 't':
    case 'T':
    usefilter = !usefilter;
    pickImage();
    repaint();
    e.consume();
    break;
    case '^':
    case '6':
    case 'u':
    case 'U':
    yadd -= 5;
    repaint();
    e.consume();
    break;
    case 'v':
    case 'V':
    case 'd':
    case 'D':
    yadd += 5;
    repaint();
    e.consume();
    break;
    case '>':
    case 'R':
    rotation--;
    if (rotation < 0) {
    rotation = numrotations - 1;
    pickImage();
    scalew = scaleh = -1;
    repaint();
    e.consume();
    break;
    case '.':
    case 'r':
    xadd += 5;
    repaint();
    e.consume();
    break;
    case '<':
    case 'L':
    rotation++;
    if (rotation >= numrotations) {
    rotation = 0;
    pickImage();
    scalew = scaleh = -1;
    repaint();
    e.consume();
    break;
    case ',':
    case 'l':
    xadd -= 5;
    repaint();
    e.consume();
    break;
    case '+':
    if (++alpha > numalphas - 1) {
    alpha = numalphas - 1;
    pickImage();
    repaint();
    e.consume();
    break;
    case '=':
    hmult *= 1.2;
    scalew = scaleh = -1;
    repaint();
    e.consume();
    break;
    case '-':
    hmult /= 1.2;
    scalew = scaleh = -1;
    repaint();
    e.consume();
    break;
    case '_':
    if (--alpha < 0) {
    alpha = 0;
    pickImage();
    repaint();
    e.consume();
    break;
    public void keyReleased(KeyEvent e) {
    public void mouseClicked(MouseEvent e) {
    public void mousePressed(MouseEvent e) {
    xprev = e.getX();
    yprev = e.getY();
    e.consume();
    public void mouseReleased(MouseEvent e) {
    e.consume();
    public void mouseEntered(MouseEvent e) {
    requestFocus();
    e.consume();
    public void mouseExited(MouseEvent e) {
    public void mouseDragged(MouseEvent e) {
    int x = e.getX();
    int y = e.getY();
    xadd += x - xprev;
    yadd += y - yprev;
    xprev = x;
    yprev = y;
    repaint();
    e.consume();
    public void mouseMoved(MouseEvent e) {
         //method selects a random image for the child to draw on or colour in
         public void backGroundImage(){
    public void paint(Graphics g) {
    g.drawImage(backimage, 0, 0, this);
    Rectangle r = getBounds();
    int hlines = r.height / 10;
    int vlines = r.width / 10;
    if (imgw < 0) {
    imgw = curimage.getWidth(this);
    imgh = curimage.getHeight(this);
    if (imgw < 0 || imgh < 0) {
    return;
    if (scalew < 0) {
    if (rotation == 0) {
    scalew = imgw;
    scaleh = imgh;
    } else {
    Rectangle rect = new Rectangle(0, 0, imgw, imgh);
    rotfilters[rotation].transformBBox(rect);
    xoff = rect.x;
    yoff = rect.y;
    scalew = rect.width;
    scaleh = rect.height;
    scalew = (int) (scalew * hmult);
    scaleh = (int) (scaleh * hmult);
    xoff = (imgw - scalew) / 2;
    yoff = (imgh - scaleh) / 2;
    if (imgw != scalew || imgh != scaleh) {
    g.drawImage(curimage, xadd + xoff, yadd + yoff,
    scalew, scaleh, this);
    } else {
    g.drawImage(curimage, xadd + xoff, yadd + yoff, this);
    static final long updateRate = 100;
    public synchronized boolean imageUpdate(Image img, Image bg0,int infoflags,
    int x, int y, int w, int h) {
    if (img != curimage) {
    return false;
    boolean ret = true;
    boolean dopaint = false;
    long updatetime = 0;
    if ((infoflags & WIDTH) != 0) {
    imgw = w;
    dopaint = true;
    if ((infoflags & HEIGHT) != 0) {
    imgh = h;
    dopaint = true;
    if ((infoflags & (FRAMEBITS | ALLBITS)) != 0) {
    dopaint = true;
    ret = false;
    } else if ((infoflags & SOMEBITS) != 0) {
    dopaint = true;
    updatetime = updateRate;
    if ((infoflags & ERROR) != 0) {
    ret = false;
    if (dopaint) {
    repaint(updatetime);
    return ret;
    public synchronized Image pickImage() {
    ImageProducer src = origimage.getSource();
    if (alpha != numalphas - 1) {
    ImageFilter imgf = alphafilters[alpha];
    if (imgf == null) {
    int alphaval = (alpha * 255) / (numalphas - 1);
    imgf = new AlphaFilter(alphaval);
    alphafilters[alpha] = imgf;
    src = new FilteredImageSource(src, imgf);
    if (rotation != 0) {
    RotateFilter imgf = rotfilters[rotation];
    if (imgf == null) {
    double angle = (2 * Math.PI * rotation) / numrotations;
    imgf = new RotateFilter(angle);
    rotfilters[rotation] = imgf;
    src = new FilteredImageSource(src, imgf);
    if (usefilter) {
    if (colorfilter == null) {
    colorfilter = new RedBlueSwapFilter();
    src = new FilteredImageSource(src, colorfilter);
    Image choice;
    if (src == origimage.getSource()) {
    choice = origimage;
    } else {
    choice = applet.createImage(src);
    if (curimage != choice) {
    if (curimage != null && curimage != origimage) {
    curimage.flush();
    curimage = choice;
    return choice;
    class RedBlueSwapFilter extends RGBImageFilter {
    public RedBlueSwapFilter() {
    canFilterIndexColorModel = true;
    public void setColorModel(ColorModel model) {
    if (model instanceof DirectColorModel) {
    DirectColorModel dcm = (DirectColorModel) model;
    int rm = dcm.getRedMask();
    int gm = dcm.getGreenMask();
    int bm = dcm.getBlueMask();
    int am = dcm.getAlphaMask();
    int bits = dcm.getPixelSize();
    dcm = new DirectColorModel(bits, bm, gm, rm, am);
    substituteColorModel(model, dcm);
    consumer.setColorModel(dcm);
    } else {
    super.setColorModel(model);
    public int filterRGB(int x, int y, int rgb)
    return ((rgb & 0xFF000000)) | ((rgb & 0xff00ff00)|((rgb & 0xff0000) >> 16)| ((rgb & 0xff) << 16)); //
    //return ((rgb & 0xff00ff00)|((rgb & 0xff0000) >> 16)| ((rgb & 0xff) << 16)); //
    class AlphaFilter extends RGBImageFilter {
    ColorModel origmodel;
    ColorModel newmodel;
    int alphaval;
    public AlphaFilter(int alpha) {
    alphaval = alpha;
    canFilterIndexColorModel = true;
    public int filterRGB(int x, int y, int rgb) {
    int alpha = (rgb >> 24) & 0xff;
    alpha = alpha * alphaval / 255;
    return ((rgb & 0x00ffffff) | (alpha << 24));
    //------------------------------- End of the code

  • Applet.getImage() but so sloooooowly...

    I've seen a couple of questions posted about this issue, but no resolution. Essentially, performance of Applet().getImage() is unacceptably slow. It happens on my machine, and others.
    I'm using PlugIn 1.3.1 in WinIE 5.5, and have the following simple JApplet:
    public class GoofyApplet extends JApplet
    public void init()
    Image img = getImage(getDocumentBase(), "goofy/mickey/rtb_down.jpg"); // a 4K .jpg
    JLabel lab = new JLabel("test", new ImageIcon(img), JLabel.CENTER);
    Container content = getContentPane();
    content.add(lab);
    validate();
    repaint();
    I run that, and have ample time to curse and fume. About 20-50 seconds.
    Note the docs for getImage:
    "This method always returns immediately, whether or not the image exists. When this applet attempts to draw the image on the screen, the data will be loaded. The graphics primitives that draw the image will incrementally paint on the screen."
    First of all, timing tests have shown that this definition of "immediately" is pretty flexible. In my last test, getImage took 38230 ms.
    I've been cruising around the Forums, looking for an answer to this question and have yet to find it. This is disturbing--I can't believe SUN would ship the plug-in with this kind of behavior--but does this mean there is no solution?
    Cheers,
    Jon

    You need to wait for the image to load in an applet. If you use the Swing version of ImageIcon it will do this automatically for you. Else, use the following methods:
    * Loads an image as a resource.
    * Note:  With Swing, could use ImageIcon instead of createImage()/MediaTracker.
    public Image loadImage(String imageName) {
       Image image = null;
       URL url = getClass().getResource(imageName);
       try {
          image = createImage((ImageProducer) url.getContent());
          if (image==null) throw new Exception();
          waitForImageToLoad(this,image);
       } catch (Exception e) {
          System.out.println("unable to load image: "+imageName);
       }//end try
       return image;
    }//end loadImage
    * wait for an image to completely load. Use in an applet.
    public static void waitForImageToLoad(Component component, Image image) {
       MediaTracker tracker = new MediaTracker(component);
       try {
          tracker.addImage(image, 0);
          tracker.waitForID(0);
       } catch (InterruptedException e) {
          //this should not occur
          e.printStackTrace();
       }//end try
    }//end waitForImageToLoad

  • Problem with getImage/URL

    I hosted a picture on tinypic.com and now, I need to make it an URL so I can use the getImage method in Applet.
    When I try to do this:
    URL url = new URL("http://tinypic.com/blablabla.gif");
    I get this error when I run the applet:
    exception : java.security.AccessControlException : access denied (java.net.SocketPermission tinypic.com resolve).
    How do I solve this?

    i mean:
    a.jar
    inside it
    a.class
    b.gpeg
    and inside a.class:
    this.getImage("/b.jpeg");
    but i misunderstood.
    why you used URL i= new URL("img");
    i think if you are to get image do like this:
    Image img= this.getImage("img.jpeg");
    am i right?

  • About jdbc url question

    the questions:
    i want to make a connect to mysql database sever.
    i use jdbc:odbc dirver
    and it works like following;
    String url = "jdbc:odbc:mysql_dsn";
    ..here i define mysql_dsn in windows control panel->ocbc
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    i want to ask if i want to use an other URL format
    like
    jdbc:odbc://localhost:3306/mysql
    it does not work!
    please be kind to answer the question.it confuse me for a long time.
    and if possible please give me more example for the URL format..
    thanks in advance.
    niko

    In your particular case (where you're using the JDBC/ODBC bridge), the java pieces don't have any knowledge about how your real driver (the ODBC driver) connects to the database. Java doesn't know if there is a file-based DB (like MS Access or Paradox) or a Server database (such as SQL Server) behind the bridge. What java (or the bridge) DOES know is how to 'talk ODBC'. Even then, the BRIDGE doesn't know all the settings for the ODBC driver (only the driver itself knows, because it pulls it from the DSN configuration).
    You might be able to tweak the connection by using the Properties object that you pass along, as the bridge may pass these to the ODBC driver and you might be able to override the DSN settings.

  • ACE 4710 http probe get url question

    I am trying to create a http probe using the request method get url command. My url contains a question mark and the ACE will not accept the url as is and it strips out the question mark character. Is there a way to make the ace accept a url containg a question mark?
    probe http HTTP_PROBE
      port 9040
      interval 10
      faildetect 5
      passdetect interval 60
      expect status 200 200
      open 1
    The url I am trying to enter is /psp/epprod/?cmd=login
    When I enter it the ACE does as shown below
    (config-probe-http)# request method get url /psp/epprod/?
    <LINE>
    ACE-APP-02/vc_peoplesoft(config-probe-http)# request method get url /psp/epprod/cmd=login
    It strips out the ? character.

    Hi Nicholas,
    To enter a question mark you need to type ctrl+v prior to entering the ?
    You enter the control key then lowercase v, then your question mark.
    HTH
    Pablo

  • Applet - with URL

    I wanted this applet to load a table, and then displays it. The load logic is not handled. Note that I could not get the load logic in the init() method because it has a mandatory throw. So I made up a name "myinit()" for the load method. I have tried to handle it within the paint method with an instaniation or constructor, but I was never able to code it properly.
    How can I get this load logic to be handled?
    import java.applet.Applet;
    import java.awt.*;
    import java.io.*;
    import java.util.*;
    import java.net.*;
    public class urla extends java.applet.Applet
      int par;
      String par1;
      int i = 1;
      int j = 20;
      int m = 0;
      int k = 0;
      String arr[] = new String[1000];
      String inputLine;
      public void myinit() throws MalformedURLException, java.io.IOException
         URL mysite = new URL("http://www.xxxxxxxxx.html");
         try
             String parameter = getParameter("par1");
             if (parameter != null)
                 par = Integer.parseInt(parameter);
             else
                 par = 99;
                 k++;
             URLConnection ms = mysite.openConnection();
             BufferedReader in = new BufferedReader(
                                 new InputStreamReader(
                                 ms.getInputStream()));
             while ((inputLine = in.readLine()) != null)
                 arr[m] = inputLine;
                 m++;
             in.close();
         catch (MalformedURLException e)
           k++;
        public void paint(Graphics screen)
           screen.drawString("THE FOLLOWING HAVE ADDED THEIR BIOS:",5 ,15);
    //                  while (i < 21)
    //                    j = j + 20;
                        screen.drawString("output -  "  + arr[0], 35, 40) ;
                        screen.drawString("output -  "  + arr[1], 35, 60) ;
                        screen.drawString("output -  "  + arr[2], 35, 80) ;
                        screen.drawString("output -  "  + par, 35, 100) ;
    //                    + arr, 35, j);
    // i++ ;
    // repaint() ;
    // repaint() ;

    Thank you for the reply.
    1. Because I am not familiar with a jappletMy first and most important recommendation is that you become familiar with JApplets before using them. You cannot learn Java by trial and error coding. It just leaves you confused. Go the the tutorials on Applets and go through them. There is no other way other than study.
    2. I want the load logic as the init method.
    However, the load table logic will not work in the
    init. (because of the throw)Please read and study the tutorials on exception handling in java. You are letting a non existant problem stop you. Your solution is to catch the exception and handle it in your JApplet. Read on how to do this either from a good book or the tutorials.
    . Forget the display logic. It is now just some
    test logic to help me debug the applet e. g. the hard
    coded displays told me that the load logic was never
    handled.
    Can I force the handle of the "myinit" method in the
    "paint" method? If so, how. I sure cannot get that
    to work.I am 98% sure that you do not want to mess with the JApplet?s paint method. There are so many easier and safer methods of displaying data in a japplet. Again, please study the tutorials before you go blindly stumbling through this.
    You are correct, I am new to java.And with study, you should do well. Good luck.
    Pete

  • Changing email host url question

    Hey guys,
    So I know it's possible to change the email host url via the pro options in the email settings. My question is, say I were to change the url from helpdesk.oldcompanyname.com to helpdesk.newcompanyname.com, would the links from old tickets still work or will they fail to load anything because the url has changed?
    To be more clear, will clicking on a link from an old ticket redirect to the new url?
    This topic first appeared in the Spiceworks Community

    http://developer.java.sun.com/developer/index.html top right click "Edit account information". I found this in 30 seconds by searching the "Discuss the JDC website" forum for "address".

  • Applet resource URL loading

    Hello Sir/Madam,
    I am trying to load a resource from Applet using the following code snippet via HTTPS protocol:
    url = new URL(..., ...);
    URLConnection con = url.openConnection();
    DataInputStream bin = new DataInputStream(con.getInputStream());
    int len = con.getContentLength();
    byte[] bytes = new byte[len];
    int read = -1;
    int i = 0;
    while ((read = bin.read()) != -1)
      bytes[i] = (byte) read;
      ++i;
    I've noticed in Safari Version 6.2 (8537.85.10.17.1) - it's occurring on other Safari version(s) as well, when I view the Java Console, I'm able to see the following log:
    network: Cache entry not found [url: https://www.mysite.com/images/logo.GIF, version: null]
    network: Connecting https://www.mysite.com/images/logo.GIF with proxy=DIRECT
    network: Connecting http://www.mysite.com:443/ with proxy=DIRECT
    preloader: Stop progressCheck thread
    Connection reset
    Noticed on the third log line "network: Connecting http://www.mysite.com:443/ with proxy=DIRECT", any ideas why its using a wrong protocol i.e. instead of HTTPS it's using HTTP? This had caused the browser *primarily Safari* (other browsers seems to ignore this) to hang for about ~30 seconds than I'm presented with "Connection reset" as can be seen in the log. Any ideas as to why the following is happening?
    Best regards,
    Christopher

    Thanks for the info but the problem is still there.
    Here is the HTML code: The strange thing is that I'm using the 1.3.1 JRE plugin but it only seems that the class will begin to be loaded if the application applet version is specified to be 1.1.2 (see first line of code). With the code below, the 1.3.1 plugin is loaded automatically.
    <EMBED type="application/x-java-applet;version=1.1.2"
    java_CODE = "SystemConfigurator.Applet1.class" java_CODEBASE = "."
    java_ARCHIVE = "dbswing.jar" WIDTH = 400 HEIGHT = 50
    pluginspage="http://java.sun.com/products/plugin/1.3.1/plugin-install.html"></APPLET></NOEMBED></EMBED></OBJECT>

  • URL questions

    Hello,
    I recently set up a domain name with GoDaddy, and I have my site hosted on MobileMe. I have a couple of questions:
    1. when I type in www.(sitename).com it goes to my site. but when i type (sitename).com it goes to the GoDaddy.com placeholder page. I've edited the www CNAME to web.me.com and from what I have already read, I'm only allowed one www CNAME. How can I make both options work?
    2. My current URL is www.(sitename).com/(name of site in iWeb)/pagename.html
    I would like the junk in the middle gone. I'm not concerned with google searching...those wishing to visit my site will visit because they are directed there for a very specific reason, not because of widespread notoriety. I don't mind www.(sitename).com/home.html either.
    Can someone help? Thanks!

    1. It is correct that you can only use CNAME once, but this is generally for one domain name. Basically, your domain name is actually domainname.com with the www.domainname.com being a sub domain of domainname.com. What you need to do is go back to GoDaddy and go to the DNS settings and if you set the CNAME for www.domainname.com, you need to create a new CNAME there and just enter domainname.com without the www - so that will be the alias with the host being exactly the same as before - web.me.com. You are still only using one CNAME, as it is still only relating to one domain name.
    The only being able to use CNAME once for every MobileMe account relates to the number of sites with domain names attached to them, so if you have two site in iWeb, published under one MME account, you can enter your domain name for one site and then set up CNAME forwarding, but if you want to publish your second site using a domain name, you would have to forward this using ordinary masked web forwarding.
    2. Unfortunately, there is nothing you can do about this unless you change your method of forwarding your domain name from CNAME to ordinary masked web forwarding.
    If you publish to MME and use CNAME, then the way in which iWeb publishes to your MME/iDisk is domainname.com/sitename/pagename.
    If you want anything different, then you need to remove CNAME or use masked web forwarding instead, so that your domain will be forwarded to web.me.com/username/sitename and then your url will be http://yourdomain.com. There will then be no site name or page name displayed after your domain name, but visitors to your site cannot bookmark individual pages of your site if you do it this way. They have to bookmark the whole site instead.
    Your only other option here is that you purchase a web hosting package from GoDaddy and upload your site directly to the GoDaddy servers. You can publish to a folder and upload using Cyberduck and with this, you can upload the contents of your site folder rather than the whole folder itself and so your url will then be http://yourdomain.com/pagename.

  • Open doc url question

    Hi,
    I have a requirement wherein I need to access some reports using the URL.
    I need to test the reports which open through a url as it needs to get embedded to the intranet.
    When I run the below url thorugh the browser I get the following error
    http://dev1/businessobjects/enterprise115/InfoView/scripts/opendocument.aspx?sType=wid&sDocName=fru%loop%report
    An erorr has occured. Not a valid query
    Please let me know on this.
    Thank You,

    Are you able to open and refresh the report in the InfoView?
    Do you have multiple reports with the same name in your BO repository?
    Regards,
    Stratos

  • Iweb url question

    Hello everyone,
    I am wondering if it's possible to create my own unique url name for my iweb site. I'm thinking of using godaddy.com or yahoo.com's domain hosting services to host my site for 2.99 a year, so that I could create my own domain name. Is this possible?
    Thanks,
    Steve

    Well, lessee, this all depends on how you want to do this.
    Are you already hosting your iWeb site on you .Mac account? If you are hosting your site of your .mac account the URL will probably look something like:
    "http://web.mac.com/<your.macnamehere>/iWeb/"
    All then you would need to do is to go to Godaddy.com and register a domain name (www.yourdomainname.com) and have godaddy.com forward that domain name to your .mac site.
    Once all this is set up, anyone visiting your site could go about it in 2 ways. First, they could just open a web browser and enter "http://web.mac.com/<your.macnamehere>/iWeb/" and get to your site.
    OR, they could enter the site name you registered (www.yourdomainname.com) and it would immediately forward the browser to "http://web.mac.com/<your.macnamehere>/iWeb/". For the rest of the time that person is browsing your site, all the URLs would look like your .mac url. This sounds to me like what you're asking for.
    Now, if you want to have your site fully hosted on "www.yourdomainname.com" without the URL changing to "http://web.mac.com/<your.macnamehere>/iWeb/" once you start browsing the site, then that's a whole different set of instructions, cause then you'd need to buy hosting space and manually upload your site to that server instead of just using iWeb's built in "publish to .mac" function.

Maybe you are looking for