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

  • SEARCH
  • Home
  • 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 5992085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:28:50+00:00 2026-05-22T23:28:50+00:00

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

  • 0

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 and when should each be used?

  • 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-22T23:28:51+00:00Added an answer on May 22, 2026 at 11:28 pm

    With the NavigationHandler#handleNavigation() approach you’re dependent on the implemented navigation handlers. You or a 3rd party could easily overridde/supply this in the webapp. This can be advantageous if you want more fine grained control, but this can be disadvantagrous if you don’t want to have external controllable influences at all. Using certain URLs and/or parameters could potentially result in a different navigation behaviour.

    The ExternalContext#redirect() delegates under the covers immediately to HttpServletResponse#sendRedirect(), without involving any navigation handler. So that may be an advantage when using the navigation handler is potentially disadvantageous. But the disadvantage is that it doesn’t handle implicit navigation nor takes definied navigation cases into account.

    All in all, it depends 🙂 If you just want a fullworthy and to-the-point redirect, use the ExternalContext#redirect(). If you want to navigate by an outcome instead of an URL, use NavigationHandler#handleNavigation().

    See also:

    • What is the difference between redirect and navigation/forward and when to use what?
    • How to navigate in JSF? How to make URL reflect current page (and not previous one)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It would seem that IE7 puts an extra 1px of spacing above and beneath
So, I'm working on some network programming in C, and it would seem that
A quick glance at the present-day internet would seem to indicate that Adobe Flash
Has any one done this before? It would seem to me that there should
It would seem natural to me that HTML would support this: <div id=comment1> <div
I can't seem to find anything that would let me to easily show a
It would seem that there is a much simpler way to state the problem.
Given the following XAML fragment: <ComboBox ItemsSource={Binding ListOfItems} SelectedItem={Binding CurrentItem, Mode=TwoWay}/> It would seem
Maybe I am not from this planet, but it would seem to me that
It would seem the Immediate window needs some jazzing up ala IntelliSense? Anyone agree/disagree?

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.