Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

How JSF is navigated to First Page?  RSS feed

Ranch Hand
Posts: 77
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to JSF and started learning from guessNumber example of SUN tutorial.
I got the idea about navigation rule. I mean how navigation flows from first to second page and so on.
But, I am not clear how it go to first page.

This is my index.jsp

My question is how it go to inputNumber.jsp ? I mean, why it search only for JSP file and not any other file?

Is it handled by FacesServlet? Or something else?

Saloon Keeper
Posts: 20498
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're on the trail. In your web.xml file, you define servlet mappings. If you check, you'll see that you've got a mapping such that any URL ending in ".jsf" gets mapped (and therefore routed) to the FacesServlet.

The FacesServlet will then deconstruct the URL to get the view path. The resource path it builds will then be modified to reference the source JSP page, resulting in a resource pathname of "/pages/inputNumber.jsp". The FacesServlet will then forward to that resource.
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!