I am new to jsp and servlets and making a Online Examination project. I want a exam(jsp page) to be submitted after a particular time interval(fetched from database). I am not able to get the time from database and the settimeout method is only taking the initial value of the time variable. Please see the code below. Thankyou.
Why do we fall? So that we can learn to pick ourselves up.
If you are new to JSP, you are heading down the wrong path right away. Modern JSP has no Java code in the pages. None. You should be putting Java code in servlets and other classes. Within the JSP you should be using only the JSTL (JSP Standard Tag Library) and the EL (Expression Language).
Actually i want the time interval that this setTimeout method will have to be fetched from a table in a database and for that i made a resultset r1 in my code above and then after fetching that time interval i copied that in variable "t" which was fed to my setTimeout method. This is an online test so my setTimeout will have different time interval for each test.