java ee - JSF works only with the .xhtml ending -


I start with the programming of the JSF website. Currently all files have .xhtml closing. When I go everything, it's all right. But when I change the name of the file from start.xhtml to start.jsf, then I became a notifixed error.

What is my fault?

  & lt; Servlet-name & gt; FaceServlet & lt; / Servlet-name & gt; & Lt; Servlet category & gt; Javax.faces.webapp.FacesServlet & lt; / Servlet category & gt; & Lt; / Servlet & gt; & Lt; Servlet-mapping & gt; & Lt; Servlet-name & gt; Faces servlet & lt; / Servlet-name & gt; & Lt; URL pattern & gt; * JSF & Lt; / Url pattern & gt; & Lt; / Servlet-mapping & gt; & Lt; Context param & gt; & Lt; Ultimate Name & gt; Javax.faces.PROJECT_STAGE & lt; / Lastname & gt; & Lt; Ultimate Price & gt; Development & lt; / Super-valued & gt; & Lt; / Reference param & gt;  

You must change the javax.faces.DEFAULT_SUFFIX parameter (In web.xml)

  & lt; Context-param & gt; & Lt; Ultimate Name & gt; Javax.faces.DEFAULT_SUFFIX & lt; / Lastname & gt; & Lt; Ultimate Price & gt; .jsf & lt; / Super-valued & gt; & Lt; / Reference param & gt; However, this is not appropriate - either use  .xhtml  or  .jsp  for your files and note that you Can not use  .jsp  with any problem (for example, for example, your IDE does not work for the autocomplete  .xhtml ). ). 

Also keep in mind:

  • Facial servlet mapping determines how JSF pages are specified by the http scenario
  • DEFAULT_SUFFIX parameter indicates what the files are expanding.

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -