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 6537115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:34:42+00:00 2026-05-25T10:34:42+00:00

FacesContext.getCurrentInstance().getExternalContext().getFlash() I am trying to use above code seems like getFlash() does not exist

  • 0
FacesContext.getCurrentInstance().getExternalContext().getFlash()

I am trying to use above code seems like getFlash() does not exist in JSF2 implementation of Myfaces. How how can I access it.

Above line gives me this error

The method getFlash() is undefined for the type Object

Here are my imports no issues with them

import javax.faces.context.FacesContext;
import javax.faces.context.Flash;
  • 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-25T10:34:43+00:00Added an answer on May 25, 2026 at 10:34 am

    This compilation error suggests that you’re actually building your project against JSF 1.2 instead of JSF 2.0. The java-ee-5 tag on your question only confirms this more as this is usually tied to JSF 1.2.

    JSF 2.0 is however supported on a Java EE 5 environment. Doublecheck if you have the proper JSF 2.0 JAR files. Extract if necessary the API and impl JAR files and read the /META-INF/MANIFEST.MF file. Doublecheck if your faces-config.xml file is declared conform JSF 2.0. Doublecheck if your IDE’s project is configured with a JSF 2.0 facet and is using the JSF 2.0 libs in build path. Doublecheck if your target container doesn’t ship with builtin JSF 1.2 libraries or that this is at least turned off.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement proper logout for my Java EE / JSF2 application. It
I am new to CDI and want to use this for a JSF2 application.
It would seem that the following are equivalent: FacesContext.getCurrentInstance().getApplication().getNavigationHandler().handleNavigation(/index.xhtml?faces-redirect=true); FacesContext.getCurrentInstance().getExternalContext().redirect(/testapp/faces/index.xhtml); Are there any differences
I have a pretty complex JSF page (we use JSF2 with facelet) in which
Why is this redirect not working in my managed bean? HttpServletRequest objHttpServletRequest = (HttpServletRequest)
I moved from JSF 1.2 to JSF 2.0 and it seems I missed something
I am trying to get the HttpServletResponse from liferay portal. I am also working
I need to have this link: http://myserver:/myproject/innerpage/clip.jsf&id=9099 to extract the id from a code
I'm trying to learn Java EE 6 and i'm just wondering how to implement
I would like to submit a key value to my backing bean so that

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.