Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Broken links for gif files

Status
Not open for further replies.

thomasphlips

Programmer
May 5, 2003
2
US
I have a web application (servlet/jsp running under tomcat) which we've put on-line for a limited number of users for testing purposes. I'm now facing the following problem:
We use quite a few small gif files (about 1K) on every page (almost always the same gif files on every page) and quite frequently the user gets broken links to some of these gif files, however when they right-click on the broken link and select Show Image, the image appears. Also if they do a refresh of the page the image typically appears without a problem. I don't see any errors in the tomcat loggings. Any ideas what could be causing this? It is quite annoying for the end-users. Could it have something to do with the network connection?

I have tested it with static html pages and it is also happening on those pages regularly.

Unfortunately I cannot organize the pages into frames, one of the requirements of the application is that there should be no use of frames.

... and the problem is occuring over the LAN. When I execute the application on a local machine (local TOMCAT server, local jsp and gif files, etc), the problem does not occur.

Just to give you some more info, here is the simple static html page I created for testing purpose:


<html>
<head>
</head>

<body>
<img src=&quot;/ap21/images/icon_advice.gif&quot;>
<br>
<img src=&quot;/ap21/images/icon_advisor.gif&quot;>
<br>
<img src=&quot;/ap21/images/icon_goals.gif&quot;>
<br>
<img src=&quot;/ap21/images/icon_home.gif&quot;>
<br>
<img src=&quot;/ap21/images/icon_lifesim.gif&quot;>
<br>
<img src=&quot;/ap21/images/icon_personal.gif&quot;>
<br>
<img src=&quot;/ap21/images/icon_report.gif&quot;>
<br>
<img src=&quot;/ap21/images/icon_risk.gif&quot;>
<br>
<img src=&quot;/ap21/images/icon_taxes.gif&quot;>
</body>
</html>

So, when I load this page with the URL (running on the desapnt01 server under tomcat):
* in most cases all images are displayed correctly,
* however in some cases some images appear as broking links (seems to be more or less random which images)

when I run the same page on my local pc (local tomcat), at the URL * everything works correctly, all images are always shown at any time.

Everytime I get a broken link when testing with the static html page, I see in TOMCAT the following exception appearing:


2003-05-05 09:48:29 - Ctx(/ap21) : Exception in R( /ap21 + /images/icon_goals.gi
f + null) - java.lang.NumberFormatException:
at java.lang.Long.parseLong(Long.java:326)
at java.lang.Long.parseLong(Long.java:358)
at java.text.DigitList.getLong(DigitList.java:148)
at java.text.DecimalFormat.parse(DecimalFormat.java:815)
at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:984)
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:725)
at java.text.DateFormat.parse(DateFormat.java:317)
at org.apache.tomcat.util.buf.DateTool.parseDate(DateTool.java:196)
at org.apache.tomcat.util.buf.DateTool.parseDate(DateTool.java:190)
at org.apache.tomcat.util.buf.DateTool.parseDate(DateTool.java:138)
at org.apache.tomcat.util.buf.MessageBytes.getTime(MessageBytes.java:555
)
at org.apache.tomcat.modules.generators.FileHandler.doService(StaticInte
rceptor.java:332)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.
java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833
)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:516)
at java.lang.Thread.run(Thread.java:479)

I really have no id what is causing this and what I should do to resolve it. Please help me, I'm getting desparate.

PS: I don't know if this could be related to the problem, but the server machine's regional settings are in Spanish.
 
>> I don't know if this could be related to the problem,
>> but the server machine's regional settings are in
>> Spanish.

That seems highly likely since the exception thrown indicates that the error occurs when trying to parse the date/time stamp of something. Perhaps the image file date/time stamp or even the date sent by the browser for comparing to the image file.


-pete
I just can't seem to get back my IntelliSense
 
Ok, but what could be the reason? Until now I cannot reproduce this on another machine (even if I put regional settings also to Spanish) + why does it not happen always, it is only in about 40% of the cases (when refreshing exactly the same page) that I get broken links.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top