Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6705005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:21:14+00:00 2026-05-26T07:21:14+00:00

Why is Java EE 6 CDI missing the @ViewScoped and @FlashScoped annotations? (especially the

  • 0

Why is Java EE 6 CDI missing the @ViewScoped and @FlashScoped annotations? (especially the former makes me wonder, because CDI stems from the Seam world, which already knew the very similar ScopeType.PAGE…)

What are the recommended workarounds when using CDI? Use Seam 3?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:21:15+00:00Added an answer on May 26, 2026 at 7:21 am

    The @ViewScoped is specific to the MVC framework JSF, not to the dependency injection framework CDI. The view scope lives as long as you’re interacting with the same JSF view. CDI has not really a notion of "views". The CDI alternative to that is @ConversationScoped which lives longer than the request scope, but shorter than the session scope. You only have to control the termination yourself. You can if necessary use MyFaces CODI to bridge the JSF @ViewScoped to CDI @Named beans. The upcoming JSF 2.2 will have a CDI compatible @ViewScoped in the javax.faces.view package.

    The @FlashScoped doesn’t exist in JSF. The JSF flash scope exist of basically a map which is backed by a short-living cookie which survives HTTP redirects. You cannot let JSF put managed beans in this scope. You’ve to manually put/get the values in/from the map yourself and/or use the #{flash} reference in EL which basically refrences the map. Seam Faces has however hijacked the JSF specific javax.faces.bean package for its @FlashScoped annotation, but this is definitely not from standard JSF API.

    See also:

    • Add items to List in Request Scoped Bean – contains some concrete examples of CDI alternatives
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been using Seam 2 (also started looking into Java EE 6) in my
[My Setup: Java EE 6 application, with EJB3.1, CDI/Weld, JSF2 running on Glassfish 3.0.1]
[My Setup: Java EE 6 application, with EJB3.1, CDI/Weld, JSF2 running on Glassfish 3.0.1]
Java's unary plus operator appears to have come over from C, via C++. int
Java Servlets - How do I detect if a user is from a mobile
I'm trying to use CDI for my JSF/Java EE application. I have the following
In my JEE6-CDI-webapp, i declared a Security Interceptor, like this one: //Secure.java @Inherited @Target({TYPE,
Are Java EE 6 CDI events transactional? If I fire an event in a
I'm just starting learning CDI and Java EE 6 but I found this piece
Is there any way to invoke remote web beans( CDI ) in java EE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.