If you access the web application via http://localhost then cookies might not be accepted. Thus session could be lost. This happens with netbeans and tomcat after a single logout has been executed.
A solution would be to use http://machinename.localdomain or http://localhost.localdomain or any other local domain if one has been configured.
Alternatively, you can configure localhost.com to your local computer with the following steps:
- add line “127.0.0.1 localhost.com” to /etc/hosts (linux). For windows read this article
- configure netbeans to use localhost.com instead of localhost
You don’t need to actually configure netbeans to use localhost.com, since you can simply type the path manually but it is better to do so.