title: How to resolve session timeout error from client side?
body: <p>I am stuck in a situation related to session timeout()While user is still active on web page.</p>
  
  <p>What is happening that on clicking a particular link on webpage user is redirected towards a popup page. This popup contains an Oracle form(Basically an applet) and this applet is embedded inside a HTML page . </p>
  
  <p>When user is working on this popup , all requests are going towards the form server which is different than Jboss server . So after some time session times out . </p>
  
  <p>I took the following approach to resolve this issue :</p>
  
  <p>I added this jquery code below in this popup page .</p>
  
  <pre><code>&lt;script src="http://code.jquery.com/jquery-1.10.1.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  var timer=0;
  
  function run(){         
      timer++;    
  
      if(timer == 2){
          $(document).bind('keyup mousemove',function(){        
              $(this).unbind('keyup mousemove');      
              $.ajax({
                  url:     'https://bdqap1.acclaris.com/bensol/common/refreshsession.jsp',
                  cache:   false,
                  data:    'html',
                  success: function(data,status) {                       
                  }
              });
              timer=0;                                    
          });
  
      }
  }// run ends here
  
  setInterval(run,1000); 
  &lt;/script&gt;
  </code></pre>
  
  <p>This code calls a link in jboss server on any mouse or keyboard movement on the popup . This should keep session alive while user is active . </p>
  
  <p>But this approach is not working as jquery code is not able to detect any movement over the Applet part . Jquery is not working is applet is in focus . </p>
  
  <p>I wanted to resolve this issue from the client side . Is there any better way ? </p>