The duration of a session can definitly be set in your web.xml if you are implementing a web application but I doubt if this is the right forum for this question; I think it should be moved to
servlet session where you can get quick diagnosis and response to your question.