File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Timer in mock exam

 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im developing a mock exam engine in jsp. In my quesiion jsp pages i want to add a timer. Can somebody help me to fulfil my requiremrnt.
Thank you
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use setTimeout/setInterval

Eric
 
Garrett Smith
Ranch Hand
Posts: 401
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A design/engineering question.

Relying on a timer solely on the client could be a problem because someone might hack it (to give the quiz-taker more time) and make a bookmarklet out of the hack.

If it's at a kiosk that is not on the internet, you won't have to worry about that problem. If it's on the 'net, you have to take measures.

You could have a timer on the server and use keep-alive. Alternatively, you could consider a combined approach, using a timer on the server and something on the client (setTimeout, or http refresh or http redirect).
 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Garrett. But im not clear about how to implement your idea. can you please tell me an alternative for that.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic