I have a Grails 2.0.0 web application that runs in both a DEV and a PROD environment without any problems. Both environments are on a CentOS 6.0 server running Tomcat 7.
Due to customer requirements, I have been tasked with deploying the application to the cloud with Amazon’s Web Services. I have been able to do this, however I am seeing strange behavior with any form fields (i.e. dropdown boxes) that read/write session data. For example, when I choose a value from a dropdown box, the chosen value should be saved to the session and recalled after an ajax call to filter a corresponding list of country data. If I choose “Bermuda”, the dropdown value actually (incorrectly) changes to another country from the list (after the ajax call), that I did not select.
While I have confirmed that the session variable contains the wrong country, I have also confirmed that all of the application specific code is working correctly (as it should, since it does so on the DEV and PROD environments). I believe that the problem may be a result of having different environment configurations. My DEV/PROD environments use CentOS 6.0, but my Amazon Cloud environment uses Red Hat Linux. Since Amazon does not provide a CentOS image, Red Hat was the closest flavor that I could find.
I’m wondering if the difference in configurations could be impacting the functionality. Or, maybe it is something specific to Amazon. For example, all incoming/outgoing traffic passes through Amazon’s internal Threat Management Gateway (TMG). Perhaps this is affecting the session data?
Has anyone had any similar experiences? Or can anyone point me in the right direction? This problem has been affecting me for weeks now…
Thanks!
The problem was that the Microsoft TMG was set to perform caching, which caused the issue.