I develop an application using two servers. Apache(80) and Tomcat(8080).
The communication between these servers worked well using HTTP and AJP protocols.
The Tomcat server (Java) maintains an array of session parameters.
These session parameters are used for any subsequent request from Apache(80).
All set-up within the XAMPP environment.
All good, worked perfectly.
Then my system got infected and I had to reinstall the computer from scratch.
After I installed everything the application works fine again, EXCEPT the session, in Java terms the
HttpSession is not maintained between two requests. The second request expects the HttpSession object to be there, but it isn't.
The JVM says: "This session is new." and creates a new HttpSession object.
The new installation wasn't as straight forward either. I had an older XAMPP before, the new XAMPP is 5.6.8.
The old OP system was Windows7 Ultimate, the new is Windows7 Home Edition. The Tomcat version was 6.something, is now 8.0.22.
I am not using the XAMPP supplied Tomcat engine. Instead, I have a separate Tomcat instance installed. I did not do that on purpose.
I worked with the stand-alone Tomcat server long before I discovered XAMPP.
The JDK has changed as well, the version is now 1.8.0_60, the old one was 1.7.
The HTML/CSS/JS files are located in a Tomcat(8080) directory.
When the browser requests data direct from Tomcat(8080), the HTML/CSS/JS files are served ok. Subsequent multiple AJAX requests
to Tomcat(8080) are served ok. That means Tomcat(8080) maintains the session to the browser. All good.
When the browser requests data from Apache(80), the HTML/CSS/JS (stored in Tomcat(8080)) files are served ok.
The subsequent FIRST AJAX request to Apache(80) is served ok. This request creates the HttpSession within Tomcat(8080).
The second AJAX request to Apache(80) fails, because Tomcat(8080) has to lookup some parameters in HttpSession, but HttpSession
is not there and Tomcat(8080) throws an exception. In other words, SESSION is not maintained between Apache(80) and Tomcat(8080).
ADD YOUR PERSONALISED EXPLETIVE HERE!!!
What I would like:
I would like to hear from anybody experienced in server-to-server communication which subjects I have to look at to find the
element to enable session. Just pointing me into the right direction would be very much appreciated.
What I have done so far:
Reading Apache internals. Searching the internet for related topics. Tested Apache by modifying some mod_xxx parameters.
I'm not an Apache person and I find it incredibly hard to get a working-understanding of these mod_xxx without having the
relevant practical experience.