In my application, a java client program is accessing a servlet. Debugging the servlet I discovered that HttpSession.isNew() always returns TRUE when the client is on the same host as the servlet. The servlet returns XML data. The client is treating the servlet as an InputStream.

It works OK when the client is on a different machine, like my desktop PC.

I access the servlet using a fully qualified domain name, but it is locally resolved. The final domain name is TBD and not yet on a DNS server.

I started using Tomcat5. Upgraded to Tomcat 6. No improvement.

According to my research, my problem can occur if the client refuses to accept the session. I tried using the HttpClient library, but it did not help.

For debugging, this is a BIG problem since all develop and unit test are on the same server.

I simply do not know enough about Tomcat to troubleshoot the session mechanism.

Any input would be appreciated.