wood burning stoves 2.0*
The moose likes Applets and the fly likes Applet time out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet time out" Watch "Applet time out" New topic
Author

Applet time out

Rajesh k Jha
Ranch Hand

Joined: May 10, 2009
Posts: 72
Hello,
I am in big doubt whether there is any any timeout handling available in applet or not, Although i searched a lot in google and found no any such thing , But I have a problem in my application ...

I have one PHP application which calls applet for file uploading. For small files its working fine and when 100% is done in progress bar its showing success message in the PHP page but when file is too big and it takes 2 hrs to upload then progress bar sticks to 99% and it does not move to 100% and doesn't show any success message.

I dont know where exactly lies the problem. Whether its PHP part or applet part.

Kindly guide me as i have been desperately looking for the solution but not sure which part i need to focus on whether its PHP part or Applet part.

Sorry...I posted it here in the Swing section...Please move it to Applet section.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18662
    
    8

There isn't anything in this question which is specific to applets either. You might just as well have the same problem with an ordinary Java application which is trying to transfer a file over the network.

So what you need to focus on is not PHP or Java. It's the network. Or perhaps your code -- from your description the problem could be just about anything.
Rajesh k Jha
Ranch Hand

Joined: May 10, 2009
Posts: 72
Thanks Paul,

In the above code when progress bar reaches to 100 it calls javascript method "i.call("Progress", new String[] {"100"});
it works fine for small files but when file uploading takes more than 1 hour in slow network then it doesn't call this javascript function hence it doesn't show success result.
Please give me any idea how can i solve this issue?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18662
    
    8

Are you saying that the line of code "rn.post()" never returns?
Rajesh k Jha
Ranch Hand

Joined: May 10, 2009
Posts: 72
yes, when file uploading takes longer than 1 hour it doesn't return, hence


i.call() javascript method doesn't execute and and it doesn't show any message of success.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18662
    
    8

Then you're going to have to look into that UrlPost object and see what it's doing.
Rajesh k Jha
Ranch Hand

Joined: May 10, 2009
Posts: 72

This is what post method is doing in UrlPost, Now I dont know whats wrong when it takes longer than 1 hour then it doesn't respond, However file is showing uploaded when i check it in the same window when i browse "fileupload" page next time.

Any help would be appreciated as its been many days i have been looking for this solution.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18662
    
    8

Have you considered asking the person who wrote that class to help you? Because the next thing you should do is to look at the methods which the post() method calls to find out which is the one which actually transfers data. Debugging code is easy unless you're doing it one line at a time over a forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet time out