Meaningless Drivel is fun!*
The moose likes JSP and the fly likes Monitoring the Activity in  an HTML Frame. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Monitoring the Activity in  an HTML Frame." Watch "Monitoring the Activity in  an HTML Frame." New topic
Author

Monitoring the Activity in an HTML Frame.

Ravi Majety
Ranch Hand

Joined: Feb 26, 2009
Posts: 59

Hi All,

My Requirement goes like this. I got a jsp which includes an frameset just like below.



Here the second frame jsp is not constant...and it changes throughout the application.

I like to write a javascript method which is able to monitor the activities in an frame. If no activity is performed for 60 mins then we should be able to display an alert.

Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30130
    
150

Is no interaction with the server considered no activity? If so, you can write a method in JavaScript (that loads in the frame) if the page is there for an hour. To include common code in every frame (except the header), you can use Tiles or include a tag.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ravi Majety
Ranch Hand

Joined: Feb 26, 2009
Posts: 59

hi Jeanne,


Yes you are right. My main objective is to provide an alert message for the user just 5 minutes before session timeout occurred. Here my approaches goes like these

1. I need either jsp as you said which refreshes for every request or included in every jsp , in which i will write a javascript method to perform the same.
2. As the code given before i like to monitor the activity of the frame so that i can give the alert message if no activity is performed for some predefined time.


Can you please provide me the suggestions if any regarding either of the above techniques to implement the process.
 
jQuery in Action, 2nd edition
 
subject: Monitoring the Activity in an HTML Frame.
 
Similar Threads
Frames in JSP
Request parameters are lost in jsp
frames problem
how to submit a form targeted to a frame in another jsp