Why -1 returned from session.getCreationTime() ?  
Author Message
rdbsJUNKREJECTED





PostPosted: 2004-4-5 20:46:00 Top

java-programmer, Why -1 returned from session.getCreationTime() ? When testing my struts code using MockStrutsTestCase the HttpSession
method getCreationTime() returns -1. A negative value suggests some
kind of failure but I can't find any reference to this value in the
API doc. Is it possible to have a session that has a negative creation
time? If so how can this happen?

When I run my code as a regular webapp under Tomcat 5.0.18 all runs
ok.

Rick
 
rdbsJUNKREJECTED





PostPosted: 2004-4-6 2:57:00 Top

java-programmer >> Why -1 returned from session.getCreationTime() ? email***@***.com (Rick) wrote in message news:<email***@***.com>...

Turns out MockStrutsTestCase uses its own imlpementation of
HttpSession.
In servletunit.HttpSessionSimulator both getCreationTime() and
getLastAccessedTime() always return -1 for a valid session.