Apache HTTPD + Tomcat and random missing images

Discussion in 'Java' started by Anders Skar, Feb 25, 2004.

  1. Anders Skar

    Anders Skar Guest

    Hi!

    I have set up a webapplication running on Apache HTTPD + Tomcat,
    running
    Apache as a frontend for Tomcat. The application is deployed as a war
    file om Tomcat.

    We have a strange problem, that random images are missing from pages.
    I reload a page or navigate to a other the missing images load
    perfectly.

    It's not an error in the application, I've tried to deploy the
    application on JBoss, and it works fine.

    Can anyone give me a clue to why this happens?

    Anders Skar
    Anders Skar, Feb 25, 2004
    #1
    1. Advertising

  2. Anders Skar

    Wendy S Guest

    "Anders Skar" <> wrote in message
    news:...
    > We have a strange problem, that random images are missing from pages.
    > I reload a page or navigate to a other the missing images load
    > perfectly.
    > Can anyone give me a clue to why this happens?


    What does the HTML source of a page with missing images look like? How are
    you generating the <img> tag or the URL to the image?

    I had a similar problem and found that ?jsessionid was getting appended to
    the image URL's, and since I have Apache serve my images off the root of the
    webserver, it had no idea what to do.

    --
    Wendy in Chandler, AZ
    Wendy S, Feb 25, 2004
    #2
    1. Advertising

  3. Anders Skar

    Sudsy Guest

    Wendy S wrote:
    > "Anders Skar" <> wrote in message
    > news:...
    >
    >>We have a strange problem, that random images are missing from pages.
    >>I reload a page or navigate to a other the missing images load
    >>perfectly.
    >>Can anyone give me a clue to why this happens?

    >
    >
    > What does the HTML source of a page with missing images look like? How are
    > you generating the <img> tag or the URL to the image?
    >
    > I had a similar problem and found that ?jsessionid was getting appended to
    > the image URL's, and since I have Apache serve my images off the root of the
    > webserver, it had no idea what to do.


    This is one of those situations where you have to carefully consider
    whether you want <html:img> or plain <img> tags. If you're dynamically
    generating content then the Struts <html:img> tag is the right choice.
    Note that the documentation specifically mentions that "URL rewriting
    will be applied automatically to the value specified in src, page, or
    action to maintain session state in the absence of cookies".
    If you want Apache to serve up static content then just use <img> tags
    and the paths won't get corrupted.
    Sometimes Struts tries to do TOO much for you...
    ps. View the source of the offending pages to give yourself more debug
    information.
    Sudsy, Feb 25, 2004
    #3
  4. Anders Skar

    Anders Skar Guest

    I use plain <IMG> tags and the HTML source is always correct. This is
    not a problem with the URL's being wrong or something being appended
    to the URL.

    The problem is that even the source is correct, some of the bitmaps
    are missing, like they were not present on the server. And this
    happens randomly (if I reload the page the bitmaps display sometimes
    display ok, sometimes they are missing).

    Anders
    Anders Skar, Feb 26, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Jessel
    Replies:
    5
    Views:
    453
    marcus
    Jun 29, 2004
  2. Andi
    Replies:
    5
    Views:
    1,326
  3. wojciech777
    Replies:
    0
    Views:
    505
    wojciech777
    Nov 5, 2011
  4. MegaC
    Replies:
    3
    Views:
    487
    Brian Helterline
    May 24, 2004
  5. Roy M

    mod_perl in Apache httpd

    Roy M, Oct 16, 2008, in forum: Perl Misc
    Replies:
    0
    Views:
    79
    Roy M
    Oct 16, 2008
Loading...

Share This Page