>Or do it by Javascript: on submission, add a timestamp argument, and >parse and display it onLoad, using the client time both times. Much more >acurate
my JSP is already sending a timestamp value to stop server cache.
like when i submit my JSP, the url becomes
http://machine:8080/myjsp?timestamp=12345678&some_more_params...
>Or do it by Javascript: on submission, add a timestamp argument, and >parse and display it onLoad, using the client time both times. Much more >acurate
please provide a sample code architecture. not getting your idea.
> >Have the servlet take the current time in the
> begining
>
> i dont have servlet. :(
>
> can not i do the whole in JSP itself ?
In case you didn't know, a JSP is a servlet - the JSP container converts your JSP page to a servlet. Just add some Java code to your JSP:
<%-- at the top of the page --%>
<% long startTime = System.currentTimeMillis(); %>
<%-- at the bottom of the page --%>
<% long totalTime = System.currentTimeMillis() - startTime; %>
render time: <%= totalTime %>