• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

session.getValue(key) depreciated - getAttribute does not work

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to migrate a Java EE designed app from javax.servlet to jakarta.servlet in order to eventually migrate from Tomcat 9 to 10 (or 11).

I wrote a class to utilize session variables to do a custom DIY login method - probably not secure - but I don't care since it's only on localhost / SSH.

I'm using session.getValue(key) to get the session ID from the client in my Controller file (org.restlet). When I attempt to do session.getAttribute(key) - it breaks everything being returned from any part of the code above it. This causes the Session.jsp endpoint that this class creates to be unreachable, and the login to totally break.

What differences does session.getAttribute(key) have versus session.getValue(key) that would break this, since session.getValue(key) is depreciated?

Screenshot-from-2024-07-27-14-37-21.png
[Thumbnail for Screenshot-from-2024-07-27-14-37-21.png]
 
She's brilliant. She can see what can be and is not limited to what is. And she knows this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic