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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:30:35+00:00 2026-05-19T14:30:35+00:00

I want to understand how JSF is storing the view and restoring the view.

  • 0

I want to understand how JSF is storing the view and restoring the view. I have read that it is creating the separate view id for each view and storing it on the server. Then it retrieves. The following are my questions:

  • In what basis view id is created and stored?
  • Is it created based on the JSP’s declared on the faces-config.xml?
  • Basically is it created for the each JSP one view ID?
  • How view ids are passed to render the response? Is it passed in the request parameter?
  • 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-19T14:30:36+00:00Added an answer on May 19, 2026 at 2:30 pm

    In what basis view id is created and stored?

    The view ID is the context relative path of the view file. E.g. /foo.jsp or /foo.xhtml. The ViewHandler implementation is responsible for creating it and storing it in UIViewRoot.

    Is it created based on the JSP’s declared on the faces-config.xml?

    Those doesn’t necessarily need to be declared anywhere in faces-config.xml. For every incoming request, it’s extracted from the request URI by the underlying HttpServletRequest object by its getPathInfo() or getServletPath() methods, depending on whether the FacesServlet itself is mapped with prefix pattern (/faces/*) or suffix pattern (*.jsf) respectively.

    When JSF needs to navigate to a new view as per a <navigation-case> in faces-config.xml, then the new view ID is simply extracted from it and a new UIViewRoot is created by end of invoke action phase. Otherwise JSF just goes back to the same view as the request was originated.

    Basically is it created for the each JSP one view ID?

    Yes, every view has its own unique identifier, which is basically just its location in the webapplication context.

    How view ids are passed to render the response? Is it passed in the request parameter?

    They are stored in UIViewRoot which is in turn just available by FacesContext#getViewRoot(). The ViewHandler implementation just calls getViewId() during the renderView() method.

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

Sidebar

Related Questions

I want to understand how a C++ program that was given to me works,
I want to understand why the following is happening. My guess is that a
I want to understand: why it happens that sometimes a char[1] in C is
Im new into JSF 2.0. On the last version i understand that if i
I want to understand how sqlite is implemented. And, want to read the source
I am new to jsf and recently i have project where we want to
I want to understand median of medians algorithm on the following example: We have
I have a JSF-page containing only a PrimeFaces Calendar component, backed by a view
I want to understand how log4j works. I've read a lot of tutorials and
I want to generate some html code for the jsf page I have (I

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.