I am doing online examination in jsp.
m not getting logic for
when exam starts timer should start and on timeout answers should automatically submitted and and it should automatically go to result page.

pls give me some example of timer with jsp where on time out answer submitted automatically.
pls pls its urgent pls give solution as soon as possible.