how to pre-compile JSF pages?
Hi,I am new to JSF and would appriciate if any one can help me find out how to pre-compile JSF pages?Thanks in advancesatsdn
The same way you pre-compile JSP pages: Set it up in your faces-config.xml file.
Here's how I do it:
<servlet>
<servlet-name>AcctID</servlet-name>
<display-name>AcctID</display-name>
<jsp-file>/AcctID.jsp</jsp-file>
<load-on-startup>-1</load-on-startup>
</servlet>
Put one of these tags for each JSP you want to pre-compile. The -1 load-on-startup value is important.
CowKing
Pre-compile forces the container to compile the JSPs when deploying the application and not when the first request for the JSP happens. You may have noticed that the first time you request a JSP after server startup takes longer than any subsequent requests.Greetings, jimbo
Buahah! I just realize I incorrectly told you to put that snippet in the faces-config.xml file. THAT IS WRONG! Do not put the above posted tag into your faces-config. Rather, put the tags into the web.xml.My apologies for that oversight.CowKing