hi guys, i'm using tomcat321 and need some help with the following situation
i've a jsp that activates a servlet and the result is put to jsp
JSP1 (on submit) => servlet1 => JSP2
within the servlet, i want to see the time taken for a particular code, so i used
java.util.Date start = new java.util.Date();
//...code to test
java.util.Date end = new java.util.Date();
timetaken = end.getTime() - start.getTime();
System.out.println(timetaken);
with that, i can see the time taken in the tomcat window.
if i click back in JSP2 to JSP1, then activate JSP1 again, the time taken is different. the time taken can be as high as 268, or as low as 62, given the same input (since i just click 'back' on JSP2 and 'submit' on JSP1)
why the difference? any kind soul pls advise
i've a jsp that activates a servlet and the result is put to jsp
JSP1 (on submit) => servlet1 => JSP2
within the servlet, i want to see the time taken for a particular code, so i used
java.util.Date start = new java.util.Date();
//...code to test
java.util.Date end = new java.util.Date();
timetaken = end.getTime() - start.getTime();
System.out.println(timetaken);
with that, i can see the time taken in the tomcat window.
if i click back in JSP2 to JSP1, then activate JSP1 again, the time taken is different. the time taken can be as high as 268, or as low as 62, given the same input (since i just click 'back' on JSP2 and 'submit' on JSP1)
why the difference? any kind soul pls advise