• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How JSF is navigated to First Page?

 
Ranch Hand
Posts: 77
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
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?

Thanks
Imran
 
Saloon Keeper
Posts: 27862
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic