Hi!
I am displaying a page to the user, which contains his/her personal
information. I want to update a field in the database that indicates
that the user has been presented the page. The requirement is NOT to
update that field until the info is presented to the user on the browser.
It's a MVC architecture. I could have written the updation code in the
servlet (Handler) just before it forwards the request to the final
JSP (Info page). But in this case we cannot be 100% sure that the user will be presented the page.
So we have to update the field only at the page load time. I had written a BODY onLoad script which would submit the FORM to a servlet the first time. The servlet would take care of the updation and it dispatches the same JSP. But in this case, ReLoad/Refresh effect is observed as the page is loaded ,is submitted and then again finally loaded.
We cannot write the database updation logic in the JSP.
I would really appreciate any suggestions on this.
Thanks in advance.
Cheers,
Udit