The platform was written years ago, what’s happening is that it’s creating cookies for HTML games, unique to each game. The games sit on servers that do not have CF as they are HTML5, so it was an inexpensive way to be able to scale the servers without any ACF (license cost) required. Now I have Lucee it’s a different story but I’d still need to make the session work across all servers though. Either way, it’s not possible/feasible to rethink and change the design including changing 59 games where the cookie checking is included ( https://www.kigso.com )
What I don’t understand is what you are doing different than I am doing in creating the cookies so that it’ll work.
I copied all of the code above to cookie.cfm and ran it on the Lucee server. Same error
Please check and adjust your setup:
Ensure that Tomcat is running on given host and port.
If this is a timeout error consider adjusting IIS timeout by changing executionTimeout attribute in web.config (see manual). [2024-10-04 13:49:59 ]
Object Moved
I realized I had not cleared the previous cookies, so cleared the cache and ran again, same issue but it only displays the Object Moved message, nothing else
After you update server.xml and catilina.policy you need to restart Lucee, flush your caches if any and run your browser in privacy / incognito mode so you are not caching old data.
okay. I can reboot the Lucee server when I make the changes and clear the cache on the browser.
Any chance you can just clarify which changes to which files I should make as I am not crystal clear on what I can leave at default and what I will need to add
// Precompiled JSPs need access to these packages.
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.el";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
permission java.lang.RuntimePermission
"accessClassInPackage.org.apache.jasper.runtime.*";
Add this:
//hack begin
// The cookie code needs these.
permission java.util.PropertyPermission
"org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "read";
permission java.util.PropertyPermission
"org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING", "read";
permission java.util.PropertyPermission
"org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR", "read";
// Applications using WebSocket need to be able to access these packages
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket.server";
};
//hack end
Okay, instructions followed carefully. I updated the server.xml first, rebooted, tried it, failed. updated the catilina.policy, rebooted, tried it, failed. Each time it just displays
I ran a test on it locally using http://localhost:8888/cookies.cfm it worked, kind of. It certainly does not throw the Object Moved error, although like ACF it looks like it’s worked but when you look at the output, there are cookies missing, it’s only allowing around 174 cookies (depending on the payload from the UUID values I presume, it can change), erasing the older ones and replacing with the newer ones.
I only need 69 or so cookies, so that would work, however, we I go to the domain and test it through IIS, I get that error.
This server was a clone of another server that was running IIS/ACF with the same domain with no issues. I had just cloned it, removed ACF and added Lucee, I did not change anything in IIS.
I changed error messages to Detailed errors in IIS but it still gives me the Object moved
I remarked out the CFLOCATION put the text “end” in there along with a CFABORT, but it just returns a totally empty page
Check the application.log in tomcat / lucee see what is the latest “ERROR”
when you have your output working directly on tomcat/lucee then move to troubleshooting IIS & the connector for it.
At a 69+ cookies, you are more than likely blowing over the default max header size in IIS.
As for empty pages –
If your headers are working correctly, then cflocation should move the request to the correct spot, which usually indicates your script did not complete or has some other error.
To test whether I can write enough cookies or not I’m using the attached, the value in the TO in the loop would just need pushing up a little for things to go wrong