|
|
|
1000 Java Tips ebook
|
|
 

Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java
programming articles and tips. Please take your copy here.
Take your copy of free "Java Technology Screensaver"!. |
|
Easy Learn Java: Programming Articles, Examples and Tips - Page 48
Previous
1060 Stories (530 Pages, 2 Per Page)
Next
My applets are big and it takes much time to download (on browser) when a networ
|
Question: My applets are big and it takes
much time to download (on browser) when a network is slow.
Is there any way to decrease the start up time?
Answer: The good solution is to make a
small core .jar file that contains part applet that is necessary to start it up
(initial GUI elements) and rest of classes can be loaded later when applet is
already running. Nobody use 100 % of functionality directly and will give an
impression that everything is ready...
This solution is good due to another reason also. If browser lost connection
during loading of one big .jar file you need to start everything from scratch.
If it happens with our solution browser will cash part of classes and it will
save time for reloading!
Usually you don’t need all the functionality of the applet at once, so the
applet can operate before all of its possible functionality is downloaded. And
.jar and .class files does get cached by most browsers.
24 comments | | Score: 0
|
Posted by jalex on Friday, May 02, 2003 (00:00:00) (3311 reads)
|
I see this error message: java.net.SocketException:
|
Question: I see this error message:
java.net.SocketException:
Connection reset by peer: socket write error even when I use Tomcat as a
localhost server.
Answer: This behavior results from HTTP
protocol. Each new page request results in a new TCP connection. When a user
press STOP or RELOAD button or goes to another page the browser resets the old
connection resulting this exception on server side.
Do not worry about, just properly handle it!
***************************************
Our older tips: March 22, 2001 - October 21, 2002
read here.
All published and not published on site tips you can find
here
14 comments | | Score: 3
|
Posted by jalex on Wednesday, April 30, 2003 (00:00:00) (5159 reads)
|
|
|