Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Setting timeout in URLConnection  RSS feed

 
Andres Delrotti
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am currently working on an application which connects to a service through a servlet. The code goes like this:




The problem is, the rules said that the timeout needs to be 30 seconds. Im my jre version (1.4), the URLConnection object does not have a setTimeout() method?. So is there any workaround I can do for this? Any form of help would be appreciated.

Thanks,

 
Rob Spoor
Sheriff
Posts: 21089
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags. You can edit your post to add them.
 
Andres Delrotti
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
^^
Fixed. Sorry about that
 
Roger F. Gay
Ranch Hand
Posts: 408
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure but it seemed like an interesting question. setMaxInactiveInterval(int interval) in Interface HttpSession?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!