User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 456,509 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,657 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 2246 | Replies: 2
Reply
Join Date: Sep 2007
Posts: 5
Reputation: kedarkhedkar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kedarkhedkar kedarkhedkar is offline Offline
Newbie Poster

Question Help needed in JSP project-Online Examination

  #1  
Sep 26th, 2007
Hi,
I am developing online examination in servlets/jsp.
the problem with I stucked with is how to show user a timer.
the jsp page which showing current question to user should show time remaining & that time should be continuously decreasing by 1 sec.
One approch is to use applet sychronized with session attribute storing current time.

But how to get value in applet from session attribute.

OR
is there a better way to show time in online environment.

Please guide me as soon as possible.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2007
Posts: 74
Reputation: lookof2day is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 9
lookof2day lookof2day is offline Offline
Junior Poster in Training

Re: Help needed in JSP project-Online Examination

  #2  
Sep 26th, 2007
You can use JavaScript for displaying timer and there is no need for binding it with a session. Rather, as soon as the user will click start exam button and the jsp page with questions is diplayed, the timer will start executing. When the user ends the exam, the timer will stop and you can display the total time. In order to monitor the time taken by user in the exam, you can pass the start time and to a Servlet where you can check whether the user has exceeded the time. If user has exceeded the time, ask a servlet to end the exam. You can put the timer in a separate Jsp page and use <jsp:include> to include it with the Jsp with questions
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 7,012
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 25
Solved Threads: 368
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Help needed in JSP project-Online Examination

  #3  
Sep 28th, 2007
You are assuming smooth execution. What happens if the browser is closed when taking the exam? What happens when the user refreshes the page? You need to maintain the user state as well as the time of the examination in the user session. Keep the involvement of Javascript in business logic to its minimum.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 3:48 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC