Results 1 to 7 of 7
  1. #1
    jitu is offline Member
    Join Date
    Dec 2011
    Posts
    3
    Rep Power
    0

    Default Images are not displayed on IE,firefox and chrome..

    I am using jsp and servlet for my application and using tomcat server to run the app...on running the application images are not displayed on
    the jsp and html..so i tried to run the html pages alone on IE..their images are working fine...i am not getting what is the problem..is any configuration is requird for loading images through server???
    below is the sample code i am using for the testing purpose of this issue...

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body background="../images/background.gif">

    </body>
    </html>

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,518
    Rep Power
    25

    Default Re: Images are not displayed on IE,firefox and chrome..

    Have you tried changing path to the image by removing the ../ and moving the image to the referred to location?

    Can you look at the contents of the HTTP GET the browser sends when it asks for the image file?

  3. #3
    jitu is offline Member
    Join Date
    Dec 2011
    Posts
    3
    Rep Power
    0

    Default Re: Images are not displayed on IE,firefox and chrome..

    yes...did all the changes..nothing works..
    and how to get the content of HTTP GET ????

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,518
    Rep Power
    25

    Default Re: Images are not displayed on IE,firefox and chrome..

    how to get the content of HTTP GET
    There are plugins that will show it.
    Also a proxy server with tracing would show it.
    And there are other debug tools (I don't remember their name) that will show it.

  5. #5
    ozzyman's Avatar
    ozzyman is offline Senior Member
    Join Date
    Mar 2011
    Location
    London, UK
    Posts
    797
    Blog Entries
    2
    Rep Power
    4

    Default Re: Images are not displayed on IE,firefox and chrome..

    Servlet may not have access permission to the folder above it. Try putting the image in the same folder as the JSP or a folder from there.

  6. #6
    jitu is offline Member
    Join Date
    Dec 2011
    Posts
    3
    Rep Power
    0

    Default Re: Images are not displayed on IE,firefox and chrome..

    Thanks bro...ur idea works..
    and
    norm thanks for your help.

  7. #7
    ozzyman's Avatar
    ozzyman is offline Senior Member
    Join Date
    Mar 2011
    Location
    London, UK
    Posts
    797
    Blog Entries
    2
    Rep Power
    4

    Default Re: Images are not displayed on IE,firefox and chrome..

    No problem. Apparently its not safe for a Java Servlet host to allow the users servlets to access the folders above it because that would allow a malicious user to use it to make changes to the server computer.

Similar Threads

  1. IE9 and Chrome
    By turboscrew in forum Suggestions & Feedback
    Replies: 2
    Last Post: 05-19-2011, 03:34 PM
  2. Replies: 2
    Last Post: 09-01-2010, 04:57 PM
  3. images not displayed by netbeans
    By R_Upadhyay in forum NetBeans
    Replies: 1
    Last Post: 02-11-2010, 08:04 AM
  4. [SOLVED] Using Google Chrome for development?
    By piyu.sha in forum New To Java
    Replies: 2
    Last Post: 10-06-2008, 09:42 PM
  5. Chroma chrome key
    By lambeau86 in forum New To Java
    Replies: 0
    Last Post: 03-19-2008, 12:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •