Highlighted

Session Invalid after Coldfusion11 upgrade

New Here ,
Jan 30, 2017

Copy link to clipboard

Copied

Hi,

We upgraded to coldfusion11. Our application is overlayed with in cfusion.war. And we bundled two more web modules(module2.war, module3.war) in the same cfusion.ear.

we share the session from cfusion.war to module2.war by using include method, this worked before the upgrade. After the upgrade the session is not carried over to the module2.war.

RequestDispatcher rd = null;

  rd = context.getContext("/module2").getRequestDispatcher("/WEB-INF/LoginServlet");

  rd.include(req, resp);

LoginServlet of module2.war saves the session

setSessionAttribute(session, SessionConstants.USER_ID, req.getAttribute("user_id"));

After user_id is set in login, when we request for other pages we check for

(String)session.getAttribute(SessionConstants.USER_ID)!=null, if this check passes, it works.

If someone can give clue of what changed in ColdFusion11 can help us troubleshooting this. Any help is appreciated.

Thanks,

Aruna.

Views

147

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Session Invalid after Coldfusion11 upgrade

New Here ,
Jan 30, 2017

Copy link to clipboard

Copied

Hi,

We upgraded to coldfusion11. Our application is overlayed with in cfusion.war. And we bundled two more web modules(module2.war, module3.war) in the same cfusion.ear.

we share the session from cfusion.war to module2.war by using include method, this worked before the upgrade. After the upgrade the session is not carried over to the module2.war.

RequestDispatcher rd = null;

  rd = context.getContext("/module2").getRequestDispatcher("/WEB-INF/LoginServlet");

  rd.include(req, resp);

LoginServlet of module2.war saves the session

setSessionAttribute(session, SessionConstants.USER_ID, req.getAttribute("user_id"));

After user_id is set in login, when we request for other pages we check for

(String)session.getAttribute(SessionConstants.USER_ID)!=null, if this check passes, it works.

If someone can give clue of what changed in ColdFusion11 can help us troubleshooting this. Any help is appreciated.

Thanks,

Aruna.

Views

148

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 30, 2017 0
Adobe Community Professional ,
Feb 02, 2017

Copy link to clipboard

Copied

To start, from which version did you upgrade? I ask because, when moving from ColdFusion 9 to ColdFusion 10 and 11, the ColdFusion Team changed the design of the session apparatus.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 02, 2017 0
New Here ,
Feb 02, 2017

Copy link to clipboard

Copied

Thanks for your reply.

we upgraded from 11.0 to 11.3. So, no major change. We found issue within our packaging. cfusion.war web.xml was missing the servlet definition. It worked in our Linux environment after fixing web.xml. But on my windows machine, i'm still having issues with Upgrade.

It could be some other missing configuration.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 02, 2017 0
BKBK LATEST
Adobe Community Professional ,
Feb 05, 2017

Copy link to clipboard

Copied

First of all, is it recommended to transfer sessions they way you do, even though it worked? Have you checked the documentation on this?

In any case, the release notes for Updates 1, 2 and 3 of ColdFusion 11​ apparently say nothing that is relevant to your problem. The following may or may not be relevant, but is worth looking into: (String)session.getAttribute(SessionConstants.USER_ID)!=null ​. What about using the CFML version of the code.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 05, 2017 0