we just deployed one of our applications on a live server.
Locally jsessionid is created, but on the live system it is missing, there is just cfid and cftoken
Any ideas what could cause this behaviour?
sessiontype = application (which is default = cfml)
We are using the ajp connector.
Hi Gunnar, could you please give some more information about what is happening? Are cookies not being generated? Are browsers retrieving response cookies and sending request cookies correctly? How do you see that the session hasn’t been created? Is it possible that the session is being set, but because of changed/or missing cookies not keeping up during subsequent requests?
Further you’ve said you are using sessiontype=application. These shouldn’t create jsessionid’s.
I just deleted my last post, because I’ve replied missinterpreting your question.
So you are missing jsessionids? As far as I understand the default is always “cfml” and you need to set it to sessiontype=j2ee for use with jsessionids (server admin, web admin or application.cfc).
I double checked another application which is almost identical. We do not set the session type there (it’s application in admin), but it sets a cookie with jsessionid. I’m wondering if an older tomcat version does it automatically?
Anyhow, setting the sessiontype to j2ee solved the issue. Thanks!
Great you found the solution to your issue Gunnar.
One main problem is: if your settings are set at web level (in Lucee web administrator) and your web apps “web-inf” folder is/or gets deleted for whatever reason, your admin settings are also wiped. One option would be to export these settings with CommandBox tool “cfconfig” for backup (so you can reimport them to any other web context), or to use the Application.cfc like @cfmitrah posted.
By setting these configuration within your Application.cfc you’ll have a better portability between local and production, because settings will override the admin settings no matter where you are. Plus: By taking that path you’ll have them automatically in your web applications backups.
If you want to export these settings to your Application.cfc, use the Export tool in the Lucee Administrator(web or server), you can export all the settings from within your admin by navigating to lucee admin => Settings => Export and copy and paste it to your Application.cfc.