File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about Session Scoped Bean

 
Dave Bixler
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a manged bean that is session scoped as such:




Upon a user pressing a login button, I save the authenticated user in the LoginFormBean. When the next page is displayed, the authenticatedUser is set and displays correctly and the resulting page (which displays correctly) has:




Everything to this point seems to be functioning correctly.

The page where the authenticated user is displayed correctly has several URLs and a form. For "some" unknown reason, as soon as a URL to another page in my application is chosen, or a command button is chosen, the authenticated User is wiped out almost as if the SessionScoped bean is no longer in the session.

Is there something that I could be missing here that would be causing this issue?

Thanks in advance.

Edit: I removed the unnecessary managed property annotation from authenticatedUser.
 
Dave Bixler
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem solved. There are "two" SessionScoped attributes and I was importing the wrong one:

import javax.enterprise.context.SessionScoped;

Sometimes I really hate auto-import generation
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic