• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

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: 28709
211
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic