HI,
We are declaring the FacesServlet
and its URL mapping in the Web.xml
. From my understanding,
FacesServlet
loaded only once at the server startup.
URL mapping is used only when first time JSP application accessed from the external context.
One of the new learner for JSF has asked me the questions, these two things are used only once by the application. Is it true? Also is there any other way by not including in the web.xml?
What I should answer?
Updated
For example, I am accessing the application using the URL http://localhost:8080/webapp/index.jsf
. When we are accessing this URL, FacesServlet
invoked and view is rendered. The following is my question:
- In JSF, we never seen changing the URL in the address bar. In that case, how it is handling the new request with the same URL?
In faces-config.xml we are giving the navigation cases as follows:
to-view-id>failure.jsp /to-view-id>
- Why we need not give the view name as failure.jsf? We are just giving the *.jsp in the
faces-config.xml
. How it is handled internally?
- Why we need not give the view name as failure.jsf? We are just giving the *.jsp in the