Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 25th, 2003, 08:54 AM
chatguy2020 chatguy2020 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 4 chatguy2020 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Will the jsp execute when a user closes browser?

Hello All!

I have a jsp application that integrates with a database. I just want to know what happens if a user clicks a link and closes the browser while the request is through. Here there are 2 to 3 scenarios. In my application, the jsp returns nothing but for putting the get parameters from the link into the database. What happens when a user closes the browser/click stop button immediately after clicking the link. In IE we see a status bar at the bottom. What happens when a user closes the browser/cliks stop button while it is halfway through? Would the database be updated?

Also, I've tried some links on yahoo. When we click link 1 and immediately click link 2 the result is random. I believe once the request reaches the web server, the transaction is complete.

What happens internally at the jsp?

I would greatly appreciate if you can give me some information regarding this. Thanks!!

Reply With Quote
  #2  
Old April 26th, 2003, 11:42 AM
Nemi Nemi is offline
Clueless llama
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Feb 2001
Location: Lincoln, NE. USA
Posts: 2,353 Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Days 12 h 35 m 19 sec
Reputation Power: 111
This is a very good question. When you click the stop button in a browser, I believe it sends a stop packet (RST) to the server telling it that it does not need the previous request. Now, generally an http server would just stop the transaction. However, this begs the question of what the app server does? It may stop the jsp in it's tracks from continued processing, but I think more likely is that it would let the jsp run to completion but not send out any data to the client (since the client said they don't want it). If the app server receives a RST packet before it has started the jsp, my guess is that it simply does not run the jsp. This is all speculation of course.


I would always assume that if a request has been made that whatever action was requested will be done. The only way to be sure is to make a script that takes several seconds to run and then hit the stop button after requesting it and see if it runs to completion. My guess is that if it starts it will finish.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Will the jsp execute when a user closes browser?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway