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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:18:02+00:00 2026-06-03T13:18:02+00:00

Im having some problems with redirections. Im using primefaces and JSF 2.1. The thing

  • 0

Im having some problems with redirections. Im using primefaces and JSF 2.1. The thing is that JSF 2.1 doesn’t have navigations rules and searching for an answer i found that I can put “faces-redirect=true”. The problem is that that doesnt worked and i dont know why. The browser keeps telling me “No se puede encontrar el caso de navegación coincidente del ID de vista ‘/Autenticacion/login.xhtml’ para la acción {1}’ con el resultado ‘{2}'” Something like i dont have a navigation case for “/Autenticacion/login.xhtml” for the first action with the second result. With JSF 2.1 does not create a faces-config.xml file i create it and I added the rule for that action but the problem persists.

These are my files:

LOGIN BEAN

@ManagedBean(name="controlLogin")
@SessionScoped
public class ControladorLogin implements Serializable{

   public String logIn(){
       //actions
       return "index" //algo tryed index.xhtml or index?faces-redirect=true
   }

PRIMEFACES COMMANDBUTTON

<p:commandButton action="#{controlLogin.logIn}" value="Loguearse" ajax="false"/>

I also try with a commandLink

<p:commandLink action="#{controlLogin.logIn}" value="Loguearse" ajax="false"/>

FACES-CONFIG.XML //IF IS NOT NECESARY I CAN DELETE IT

<navigation-rule>
    <from-view-id>/Autenticacion/login.xhtml</from-view-id>
    <navigation-case>
        <from-action>#{controlLogin.logIn}</from-action>
        <from-outcome>index</from-outcome>
        <to-view-id>/index.xhtml</to-view-id>
    </navigation-case>
</navigation-rule>

So if anyone can help me to do this redirection…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-06-03T13:18:04+00:00Added an answer on June 3, 2026 at 1:18 pm

    Indeed, in JSF 2.x you don’t have to define navigation rules. You don’t need faces-config.xml at all, just in some special cases which are not covered with annotations (eg. custom ExceptionHandlerFactory).

    Using return "index?faces-redirect=true" is completely fine. faces-redirect=true means that you redirect from one xhtml to another instead of default forward.

    Difference between forward and redirect

    In this case just make sure that your index.xhtml page is in the same directory as the page from which you try to access it.

    Otherwise if the index page is located in another directory then you have to specify absolute path with forward slash / in the beggining like this: "/indexFolder/index?faces-redirect=true".

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

Sidebar

Related Questions

I having some problems implementing IOC using windsor. I have several different implementations of
Having some problems with the jQuery UI Dialog and using checkbox values within it.
Im having some problems understanding some code in a programme I have inherited. CGPoint
Im having some problems with binding in wpf/xaml. Have this simple file: <Window x:Class=test.Window1
After having some problems with these two linker errors on SO , I have
I am having some problems with a few queries using Linq to NHibernate. These
Having some problems initialising a google map using geocoding. First issue is with any
I am using appengine and seem to be having some problems with url routing
Having some problems with getting some ajax script to work. Using this as the
im having some problems trying to read a SQlite data base from flash using

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.