• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Control user's session in applet

 
maja neskovic
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello! I have made one applet looking like questioner. When user answers on first question and presses Submit button, he clicks on Next button and answers on second question. I have put counter in Next button coding (if (counter==1){//show first question} else if...) to control question showing. There are 4 questions and answers are recorded as one row in database (each question has it's column, table is updated when user clicks on Submit).

I need to control user activity and not to allow him to does more than one recording to database per testing and to disable him to restart applet when he clicks on refresh page option.

Can anybody explain me how to control session or any similar solution?

I have posted here, but I didn't got the solution.

I hope somebody can help.
 
Paul Clapham
Sheriff
Posts: 21554
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After reading that thread on the other forum, I don't think I got an answer either.

Anyway, I wouldn't try to copy the idea of cookies from a web application. Using cookies means you have to store data on the client's computer, and that means you have to sign your applet. Instead I would store the information you want to keep track of in the database itself.
 
maja neskovic
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it sounds like easier solution. But I have many applets that will be put on school's learning system for testing and there will be many tables at the database. Programmers at the school are not satisfied with this solution. That is why I have to do something else.

If it is helpful, I have signed applet in NetBeans by activating Web start.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
maja neskovic wrote:Programmers at the school are not satisfied with this solution.

Why not? If there are any objections, maybe they can be addressed.
 
maja neskovic
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have got directions to do. Is there any way to create session that will follow specific user? That would help me.
 
Paul Clapham
Sheriff
Posts: 21554
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see why it makes any difference that there's a lot of tables in the database. You don't have to change any of them. You just need one more table to store session information for users.
 
maja neskovic
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have made table and implemented controlling logic in applet. It seems OK.

Thank you for advices.

Greetings!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic