Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

java - Problem logging out user on chat applet -


i wish users of java chat applet automatically logged out when closing browser window.

i use following:

public void destroy() {     sendlogoutmessage(); } 

however works 3/4 of time (probably due network delays).

the chat applet pings server , logs them out after 90 seconds (this allows them reconnect due internet problems) - removed eventually, way better catch close event.

i think code not work in 100% cases because called in destroy method not wait , closes including network connections being opened. so, if network slow applet output streams killed before sends logout message server.

if theory correct can check it.

  • try see whether logout command in server logs (in case of failure). believe find command did not arrive.
  • open java console on client side. ioexception or socketexception. hope examining of exception may give idea how improve solution.

additionally i'd suggest following.

  1. add servlet session listener on server side , logout automatically when session expired.
  2. decrease time-to-live of http session reasonable number. default value jboss 20 minutes, make 1 minute.
  3. implement keep-alive mechanims applet. may simple. perform http every 30 seconds special url nothing. keep session alive.

this solution should addition existing solution works 3/4 of times.

i hope helps. luck.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -