• Post Reply Bookmark Topic Watch Topic
  • New Topic

HttpServer and Applet support

 
Mik Seiko
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm writing a small Http Server and have couple questions.

Does HttpServer that provides also Applets need any special
support for socket programming? I have used sockets and streams
in my HttpServer and noticed that html pages and images are handled
well but what comes to Applets there are couple things that I don't
understand.

When Html page has Applet tag Browser usually make multiple requests to
HttpServer to get Applet. Is this normal? Does Browser usually load Applet once with one request or does Browser use multiple requests for loading Applet? Or are there cases were Browser must refresh Applet from HttpServer?

Have anyone clear picture what should be considered when Applets are loaded
from HttpServer?

Cheers,

M.S.
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mik Seiko:

When Html page has Applet tag Browser usually make multiple requests to
HttpServer to get Applet.


Yes. The browser receives the page with one request, finds the applet tag and makes another request to get the applet. Same thing happens with images, frames, flash and so on.
 
Mik Seiko
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, but what could cause that Applet is requested multiple times?
Not only once. Have anyone any ides why this happends?
Are there any documents that contains information how a Http server
should work when Applet is requested by Browser etc.

> Same thing happens with images, frames, flash and so on.
Or do you mean that Applet's content may cause more that one request?
Or if Applet's size is big does Browser request is multiple times etc.
anyone have any ideas?

Cheers
[ November 15, 2007: Message edited by: Mik Seiko ]
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mik Seiko:
Yes, but what could cause that Applet is requested multiple times?
Not only once. Have anyone any ides why this happends?


Are the multiple requests for the same applet class file? An "applet" can consist of any number of class files so it would make sense that the class loader would make multiple requests if the applet were not jar'ed up.
 
Mik Seiko
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's Applet Jar and running in Java 1.4.2 environment.
But I found this kind of topic from Sun's forum.

http://forum.java.sun.com/thread.jspa?threadID=462488&messageID=4060642

Is this really a bug! Can't update JRE to version 6.0 ...

What a nightmare.

Cheers

M.S
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apparently upgrading to 6 will not solve the problem either. Really, it is not a "nightmare". Your web server just handles the requests as they come. It is not terribly efficient, but there isn't much one can do about it from the server side.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!