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. Not sure what that means. 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.
To isolate the problem I am using the following simple test. processRequest simply returns the value of 'count'. Normally, it should increment each time the servlet is accessed. But when the client is on the same machine as Tomcat, it is stuck at 1 because httpSession.isNew() is always returning TRUE.
Any input would be appreciated.