• 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
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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]
reply
    Bookmark Topic Watch Topic
  • New Topic