Session in the servlet

Hi!

A Netbeans web application use some servlets, not jsp, and tomcat, and postgre sql.

The big problem is executing some querry after the jdbc connection was closed, or can't open a new jdbc connection because too many are open, for example. And the session in some situations lost who is the logined user :) This was the application probem. If you have any idea to solve tham please anounce me.

My problem is I don't know how to check if the session is valid or not in the folowing function:

protected void processRequest(HttpServletRequest request, HttpServletResponse response){

request.getSession();

// how to check that session?

}

[688 byte] By [matheszabia] at [2007-11-27 11:58:55]
# 1

do session management. u can use filters.

preetam_picta at 2007-7-29 19:22:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Thank's, how to do that? Where to find some samples, tutorial?

matheszabia at 2007-7-29 19:22:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...