Skip to main content

Multiple HTTP GET requests for individual classes

3 replies [Last post]
pgokhale
Offline
Joined: 2006-02-07
Points: 0

Hello,

I have a Java plug-in deployed under tomcat 6. JRE version is 1.6.0_16. All the required jars are deployed packed (pack.gz) and the applet tag has 'java_arguments' parameter defined as:

All the jars get loaded nicely as I see in the Tomcat access log:
127.0.0.1 - - [03/Mar/2010:17:24:04 +0000] "GET /testapplet/lib/log4j-1.2.13.jar.pack.gz?version-id=1.2.13 HTTP/1.1" 200 0

but immediately I see a bunch of GET requests for the individual classes in the same log4j jar:
127.0.0.1 - - [03/Mar/2010:17:24:06 +0000] "GET /testapplet/lib/org/apache/log4j/Logger.class HTTP/1.1" 404 0
127.0.0.1 - - [03/Mar/2010:17:24:06 +0000] "GET /testapplet/lib/org/apache/log4j/Category.class HTTP/1.1" 404 0
127.0.0.1 - - [03/Mar/2010:17:24:06 +0000] "GET /testapplet/lib/org/apache/log4j/spi/AppenderAttachable.class HTTP/1.1" 404 0
...

As you can see each of these GET requests are returned a Http error code 404. While testing locally, this isn't adding any delays, but over a real deployment it's bound to be slow down the applet loading while the server is responding to each of these class requests.

Subsequently, the application itself runs without any issues and these bogus class requests failures have no effect (thankfully) on the functionality.

Any one seen this behavior? Appreciate any thoughts or help.

Regards,
Parag

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pgokhale
Offline
Joined: 2006-02-07
Points: 0

I found the problem to be a Class-Path value in a jar's Manifest file. The Manifest file had following:
Class-Path: .
All the jars listed after this jar in the applet tag caused the client to request specific .class files to server even when the jars, themselves were already loaded. Once I rebuilt the jar without Class-Path, the unwanted server GET requests have stopped.
I would suspect this to be a bug in new plug-in.

cvd
Offline
Joined: 2009-03-18
Points: 0

I wonder if [b]codebase_lookup[/b] parameter would make any difference in this case.

pgokhale
Offline
Joined: 2006-02-07
Points: 0

Yes, I should have mentioned it. I have already set that parameter value to 'false'