Image and X display problem

Hi,
I am running a JSP file in Unix machine, the web server is apache using port 80. Servlet Engine is using port 8009.
In my Jsp program, I want to read an image file:
Image image = Toolkit.getDefaultToolkit().getImage(url);
My problem is : I need to issue a "xhost +" command before I am able to display the image in my client PC's browser.
Please tell me why xhost + is necessary? How to by-pass the xhost + command.
If I don't type the xhost + command, I will get the following error:
java.lang.InternalError: Can't connect to X11 window server using '10.3.10.15:0.0' as the value of the DISPLAY
variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:59)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:58)
at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:57)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at java.awt.Toolkit$2.run(Toolkit.java:512)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:503)
Pls help.
Urgent. thanks

X is inherently network-aware.
If you want access an X-server (by e.g. launching a GUI-program), the client must be allowed to connect to the X-server.

Similar Messages

  • Problem with images and text displaying correctly

    I don't really know how to explain this problem and I had two screenshots ready to upload to show the before and after but we apparently can't upload photos now...SOOOO I will try my best.
    The issue began when I got a new computer at work (Windows 7 instead the Windows XP everyone else has) and was/is present for me in InDesign CS2 and since we were planning on updating to CS5, I figured that having an updated version would fix whatever issue it was. That was a wrong assumption unfortunately.
    When I open any document, all images and text are displayed properly until I scroll up/down or side-to-side and NOT using the scroll wheel for up/down. This is probably so confusing and I'm sorry I can't describe it better...the mouse I use has two programmable buttons that I set to coast up and down and to go side-to-side I can push the scroll wheel to one side or the other and it coasts that direction. When I do either of those things, the text looks like it is permanently greeked and the images look....weird lol like they are in 16 bit or something like that. To fix the problem in CS2, I have to click and hold on a text block until I am able to adjust text so that I can see it adjust in real-time. In CS5, I have to do the same basic thing except I don't have to click and hold as it does that by default (awesome feature btw!!)
    I have already updated my graphics card driver (Nvidia 9400 GT 1GB) and my processor driver (Intel Core2Duo 3.0ghz) and I have 4GB of RAM. I tried updating both CS2 and CS5 but both are updated already. I've also tried doing the whole inx. export and cleaning the preferences file or whatever that is called. Nada. If someone thinks they can help me, I can send them the two images I was going to upload here. Email me at justgeig (at) gmail (dot) com Thanks in advance!

    maybe greeked isn't the right word...i don't know how to explain it
    here is the correct view. It is much more noticable when the whole document shows this.

  • Thumbnail images, bigger images and some text PROBLEM

    Unclear title, with an unclear problem.
    What I'm wanting to do is, when I click on a thumbnail image, I want the content in the DIV on the right to change accordingly to display the image and information relating to the thumbnail you have just clicked. I'm using Dreamweaver CS5 on MAC:
    - I have a page split into 2 vertical columns. On the left I have 6 thumbnail images in their individual DIVs, wrapped all together in another DIV container
    - on the right of the page I have assigned a large DIV to display a big image with a description underneath of what the project was etc...
    I know you can attach a behaviour to the thumbnail to change the big image on the right, but I have a short paragraph of text below the big image too, and I don't particularly want to make the image and text one huge image. I want to keep the text, text.
    How do I do it? Is this a simple thing? or is there a lot of coding to do this with JQuery or Javascript or something? Is there something to do with Data record sets involved?
    Is there a way of doing it that when you click on the thumbnail that it can load the relevant image and text into the DIV on the right?
    Sorry if it's not clearly explained, not sure how to do it, therefore not sure if I'm describing it properly.
    As always, all help and advice very welcome.

    Hi Murray,
    Here is a screenshot of the page in question.
    - On the left are the thumbBox DIVS, (shown here, "thumbBox1")
    - On the right there is a main container, "galleryDisplay"
    - Within "galleryDisplay" there is a DIV for the large image, "galleryDisplayImage", and another DIV to display a paragraph of information on the project, "galleryDisplayInfo".
    Just to repeat, I want that when you click on the "thumbBox1", that the content of "galleryDisplayImage" and "galleryDisplayInfo" change in accordance to the thumbnail clicked.
    Murray *ACP* wrote:
    The easy way to do this is to have each click on the thumbnail change the display Property of a container (containing both the image and the caption) from "none" to "block".  In the column on the right, just line up a series of divs, each containing the desired image+caption, and use DW's Chage Property behavior on a null link surrounding the thumbnail.  For example, a thumbnail image:
    <a href="#" onClick="MM_changeProp('image-caption1','','display','block','DIV'); return false"><img src="path_to_thumb.jpg" width="165" height="50"></a>
    Each click on a thumb would also have to change the display Property of all other image-caption containers to "none".
    I don't understand what I have to do with the relevant large image and text. You say to "line up a series of divs"... I don't understand. Where do I "store" the image and text combinations for each project? I can understand how an image can be loaded into the image div, but how and from where do I load in the html text with css applied into the info div?
    Can I change the content of 2 separate divs from one click?
    Sorry for not being overly clear, but I can't get my head round this.
    Thanks for your help. I'm sure I'll get there in the end with your expertise.

  • Refreshing image ( and not displaying the one in the cache )

    Hello , I made an app with many galleries stored locally but i made another section with a daily image, and this image is located on an ftp server http://XXXXX.com/image.png for example so everyday i upload the new one with the SAME name as the older one
    ( that is replaced by the newest ) , however the app is always displaying the older one , even if i restart the app , the computer or kill completely the app.
    How could i do please?
    Could i add something next to the image url (in a gallery module) to make it refresh everytime the app loads?
    PS : if you couldn't solve this problem could i put a button to refresh the image?
    Thanks
    EDIT : I reinstalled my app and changed several times the image and now it's working?
    Is it temporarily so this image will be cached and the issue will appear once more or was it a bug?

    Hello
    I don't believe you can without addressing/changing the way the image is loaded on your server.
    You have several options to remove the caching even from files you upload.
    You can for example use a .htaccess file in the folder where your image is uploaded
    (assuming your webserver is an apache server)
    <IfModule mod_expires.c>
    # Enable expirations
    ExpiresActive On
    # Default directive
    ExpiresDefault "access plus 1 day"
    # Images
    ExpiresByType image/gif "access plus 1 minute"
    ExpiresByType image/png "access plus 1 minute"
    ExpiresByType image/jpg "access plus 1 minute"
    ExpiresByType image/jpeg "access plus 1 minute"
    </IfModule>
    You can also set the header using a loading script in php, asp or whatever language your server supports (e.g. showimage.php?img=blabla.png which allows you to set the no cache header (or limited cache header) in the php header before loading it in your
    applications (works also for asp, etc.). Any searchengine will give you some inspirational examples.
    Regards
    StonyArc

  • Rescue and Recovery display problem

    I'm running Rescue and Recovery 4.21.0016.00 and when I boot the R&R rescue media boot disk I come up with the screen that shows the options however the the image is too big to fit the screen. I've tried 2 different monitors but the program makes the image size too large so that I can't see all the options and pick what I wnat to do. I'm  running this on a IBM Netvista 8307-GU6. Any ideas out there????????

    I found another post for the same problem and found the fix. went into the BIOS and increased the display memory and that fixed my display problem. Now if I can just find out why the R&R program won't recognize the backup file when I boot from the CD I'll be happy. The backup file is on a USB drive and when I look at it from the Windows XP side it shows it being there but booting from the CD there are no backup files to restore from.  Any ideas????

  • Mid 2010 Macbook Pro sleep and external display problem

    I recently upgraded to the new 2010 15 inch core i7 Macbook Pro. The problem i have is that it will not detect an external display (23inch Cinema) after waking from sleep. This happens after using the display to extend the desktop and also when using the Macbook in closed mode.
    I've managed to get it to detect the display only after either restarting the Macbook completely or by going into energy saver and switching to dedicated graphics then going back to detect display.
    It seems that when on integrated graphics it doesn't register that an external display is connected. If i leave a program open and running that causes the dedicated graphics to kick in then it works ok. If i close all programs, shut the macbook pros lid, computer sleeps and external display shuts off. If i click the mouse to wake with lid closed, apple logo lights, machine starts up few seconds later macbook returns to sleep. If i open the screen the machine wakes as normal but the external monitor doesn't.
    Any help is much appreciated as its starting to frustrate me now...
    Many thanks
    oh and im running OSX 10.6.3

    I thought it was intermittent to begin with until i started looking into it. By leaving programs open, like aperture, before i put the machine to sleep it appears to wake the external monitor up without a problem. If i shut all programs or leave basic things open like safari and mail which don't require the dedicated graphics, then upon wake it wont register an external screen is connected.
    Manually detecting displays in settings doesn't work.
    Disconnecting and reconnecting mini display port doesn't work.
    Turning off power to cinema display and powering back up doesn't work.
    To get the display going again its either 1) turn off macbook pro and re-boot or 2) re-start the machine then the display is automatically recognised. Or 3) launch a programme that kicks in dedicated graphics then manually go in and detect displays again..... like magic the display then springs to life.
    No ideas anyone??

  • How to solve the flash Builder 4.6 scroll view and textinput  display problem?

    I have a dynamic form application which worked well on flash builder 4.5, having display problems in flash builder 4.6 now. What I did is adding
    TextInput objects  to a scroll view and set the texts for them dynamically. Everything is fine after the screen loaded. But if I scroll down, sometimes the texts will be placed in wrong positions. I attached the screen copy of the wrong display. Does anybody know how to solve this problem? Thanks.

    Check out the two threads below (if you have not already). I have not tried it but aeonus describes an approach that made me think of something that might work ... It is a workaround but, what if you have a text field (txtA) with the skin that does not allow soft keyboard selection, but does scroll correctly, and on the onClick event of that text field, you dynamically cover it with another text field (txtB) that does allow soft keyboard selection, (but does not scroll properly) and trigger the keyboard. After you get the entry from the user, set the value of txtA and destroy txtB ... leaving you (theoretically) with properly scrolling text fields. If you have a lot of those in your app, you might want to write a component that implements that behavior.
    "Create a dynamic textfield, and on click, invoke create a StageText instance at the same location as the textfield (by setting the StageText.viewPort property)
    Finally, set StageText.softKeyboardType to "numeric" and call StageText.assignFocus();"
    http://forums.adobe.com/thread/915019?tstart=0
    http://forums.adobe.com/thread/911214?tstart=0

  • Converting GIF images to JPG - display problems in browser

    I am currently writing a program that uses the ImageIO package (javax.imageio.*) to take GIF and PNG images and convert them to JPG images. The program seems to convert them correctly, especially for the PNG images, but the converted GIF images don't open in a browser. They open just fine in Windows Picture and Fax viewer, but when I try to open them in IE or Firefox, it only diplays the little red 'x'.
    Is anyone familiar enough with Images and the ImageIO package in Java that they may have some insight on why these converted GIF files won't display in a browser.

    Bonjour,
    In my [website|http://iweb.debutersurmac.com>, all the images are JPG files,
    By default iWeb '09 converts images to JPG (yes, it's true)...
    ...unless you use masked images*
    !http://i32.servimg.com/u/f32/09/02/44/99/masked10.jpg!
    Crop your images (with Preview) before you paste them in iWeb. Don't use mask, Unmask an image if it's masked. That's the trick!
    !http://i32.servimg.com/u/f32/09/02/44/99/unmask10.jpg!
    (* images with transparency areas (ex : some PNG and GIF), rotation and shapes in iWeb make also PNG files in your website.)

  • 10.4.5 Update is out and fixes display problems.

    For all who have not updated yet:
    You can either on Apple.com/support/downloads get the Intel 10.4.5 update or the blue Apple in the left top corner of the screen click it and then software update.
    This will list all available updates depending on what is on your MAC.
    There is several Imac Intel users reporting fixes for their display problems ect. after installing the update + restarting.

    This fixes the problems except maybe for the 20" 256mb vram ones ????
    www.hardmac.com reports still some problems on one of theirs.

  • Htmltext, images and css' display property

    Hi all,
    I've got two questions; one about whether or not something is
    natively
    possible in Flash and another if there is a free or
    commercial component
    to fix the problem.
    I know CSS/HTML in textfields is one of the weak points of
    Flash, but I
    still would like to clear something up (couldn' find a
    definitive 'not
    possible' through google).
    I'm trying to display images from HTML/XML as block through
    CSS in a
    dynamic textField but can't seem to get it to work. I kinda
    doubt
    whether it is possible at all...
    I've tried too many variations to display one piece of code
    which fails,
    but it boils down to:
    * I load XML in which headings, paragraphs and images
    (usually within a
    paragraph) are set.
    * I load CSS (or generate with AS for that matter) which
    set's the
    properties of the various tags.
    * Images always display inline even if just one single char
    fits beside
    it in the field. If nothing really fits beside the image,
    Flash still
    places text there which is then hidden from the reader. All
    attempts to
    have the image's display set to block fail. Also if I try
    through a
    surrounding p-tag.
    I tried all from XML.ignoreWiitespace,
    TextField.condenseWhite, adding
    p-, and br-tags. It just won't work.
    If there really is no (why not?!) possibility to have it done
    natively,
    does anyone know of a solution (paid or free) done
    previously? I can
    think of some ways to make a start, but kind of don't have
    the time to
    make a really thorough effort...
    Thanks in advance?
    Manno Bult
    http://www.aloft.nl

    OK, kind of 'fixed' this one:
    * parse HTML/XML for contained img-tags
    * added id attribute if not present
    * place HTML/XML in field
    * get reference to loader object associated with the image(s)
    through
    TextField's getImageReference() method.
    * aad eventListener to it
    * on INIT or COMPLETE: retrieve height of image/loader object
    * insert multiple paragraphs after image so that next actual
    text
    appears below image. Multiple paragraphs are inserted to
    accomodate the
    useage of scrollV for field, otherwise (one big paragraph)
    image would
    be considered as one line and scrolling would look strange...
    Inserted
    paragraphs have a set leading style so the number of
    paragraphs to
    insert can be calculated.
    ugly but for me it works (at the moment). Anyone any better
    solutions?
    kind regards,
    Manno
    Manno Bult
    http://www.aloft.nl

  • Preview app and retina display problem after installing Maverick

    Hi everyone, i upgraded to Maverick yesterday and i now have a problem with the software "Preview 7.0". I've got a macbook pro 13" retina.
    Before Maverick i could visualise image in high resolution using Preview, and the 100% view was showing the image full quality. Now my Preview software acts like i'm not on retina and i can only visualise my images with the resolution of a standard monitor.
    Does it make sense ? Please help !!!

    I'm having the same issue with Preview not displaying images at the correct resolution.  If you also look at the info in Preview, there are metadata issues showing up.  Under "Creator's Contact Info" this is the info displayed.
    Creator's Contact Info: , CiAdrCtry, CiAdrExtadr, CiTelWork, CiUrlWork, CiAdrPcode, CiAdrRegion, CiAdrCity, CiEmailWork
    Something is broken with the program.
    Macbook pro retina 15" (late 2012)

  • CS4 Bridge - Image and Contact Sheet Problems (Windoze)

    Problem #1: Out of shear chance, the first directory that I picked on that contains press images, resulted in Bridge not displaying thumbnails, or even being able to work with the image, because Bridge declares that the JPEG file is not a JPEG image. But, here is the kicker, when creating the thumbnails, it does briefly display a thumbnail before replacing it with the JPEG icon. There is nothing wrong with the images as Photoshop CS4 has no problem working with the same images. Double-clicking on the JPEG icon in Bridge results is it calling Photoshop to display the image. Lastly the images were created with Photoshop CS3 on a MAC, as indicated in the EXIF data. I haven't tracked down a pattern yet, as I just installed the software last night. Even so, there is no way that Bridge should have trouble reading CS3 produced JPEG images, but it does.
    Problem #2: With the old contact sheet method, one could tell the plugin to include all sub-directories. I can't find a way to get Bridge to do the same thing. If it is there, it certainly is not user friendly. There was nothing online, or in the manual, about how to do that. While I like the idea of producing a PDF of the contact sheets, getting there is not so simple. I'm new to Bridge, having never having the need to use it prior to this release.
    Any help with these two problems will be appreciated.

    If Bridge can not show the thumbnail, Output workspace can not generate the PDF or web gallery for this image. Because it use the Bridge's DOM to process those images.
    For the subfolder issue, you could use the Bridge's 'Show Items from sub-folder'. You could find this option from the directly path list at the tool bar, or from Menu View->Show Items from submenu.

  • Create an image and not display it but saving it as a gif

    hi there,
    i want to save an offImage as a gif. i have something like this (just the main lines)
    JPanel jp = new JPanel()
    Image img = jp.createImage(w,h);
    Graphics gph = img.getGraphics();
    gph.draw...
    I've got an encoder class (GifEncoder) which works just fine with an image created as in the example above.But I don't want to display the image. Just create it, draw on it and save it
    Unless i display the image (in the Panel, e.g. jp) I cannot save the picture as a gif. So I must register it with a component. Is there a way I can avoid this?
    Thank you

    I use the following which is for JPEG encoding but should work for GIF:
                                  BufferedImage tempBImage = new BufferedImage(320,240,BufferedImage.TYPE_INT_RGB);
                                  Graphics2D g = tempBImage.createGraphics();
    g.draw~~~(~~~); //do your stuff here
         //Create a fileoutputstream.
         FileOutputStream fos;
         fos = new FileOutputStream(thumbDirString+ "\\" + picName);
         JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(fos);
         encoder.encode(tempBImage);
         fos.flush();
         fos.close();

  • T60p, Vista and External Displays Problem

    I have a T60p with the ATI video running Vista that in the office gets dropped on a docking station and has 2 displays conncted to it, one through the DVI connection and one through the analog connection.  If I start the machine with it on the docking station it uses the DVI display as the primary and the VGA/analog one as the secondary.  That is fine.
    When I leave the office I use it as a laptop or sometimes at home I'll drop it on another docking station that doesn't have anything but a network connection and sometimes an external drive connected to it, and then RDP to it from one of my home machines.  When I come back to the office the display setup is always confused.  
    Usually it will reverse the 2 displays making the analog one the primary (this is very annoying), but sometimes it will only display to one of the external displays and sometimes it will just display to the built in display and to neither external display even though the thing is in the docking station and the lid closed.  Nothing seems to fix this when it happens... I can go to the display adaptor settings or the ATI control pannel and swap the display positions, but it still treats the analog as the primary (start menu, taskbar...) which I don't want, and if I reboot it it will go back to using the DVI as primary no matter what I leave the display settings at.
    Any ideas how to get it to do the same thing every time it's on the docking station in my office?  (I don't care what it does on the docking station at home, I if it's on that docking station it only gets RDP'ed into)

    Thinking out loud... is it possible it's the docking station?  One of my guys here at work has done a little research about similar problems one of our users is having and there appeares to be some evidence that swapping docking stations might fix it.

  • Database Images and Web Display

    I'd like to know if Oracle 8i stores images in its tables that could be displayed in HTML format-does Informix.2000 or another product can do it?
    What 's the best package for fast development of database with images?
    I appreciate your help!.....ze'ev

    hello Sir,
    I have to make a Image Library.
    What I have done is I am just stroing the Image Path into the path
    and retrieving the path from the database.
    But now I am asked to Store the Image in the Database..
    Could U Please tell me at the time of retrieving the Image
    what exactly I have to do..
    I am just 1 month new to JSP...(Practically)
    Could U please write me the Code for Converting the BINARY Data into
    InputStream ...
    or what exactlt I have to do..
    Please Guide me man..
    Thanks In Advance...
    With Regards
    Eklavya

Maybe you are looking for