Mixing JSP and XHTML (Facelets) in JSF2 Project - possible?

This is answered in the Facelets FAQ : use prefix mapping on FacesServlet You can then access JSP pages by example.com/faces/page.jsp and Facelets pages by example.com/faces/page.xhtml Here's a cite of relevance.

This is answered in the Facelets FAQ: use prefix mapping on FacesServlet. You can then access JSP pages by example.com/faces/page.jsp and Facelets pages by example.com/faces/page.xhtml. Here's a cite of relevance: How do I use Facelets and JSP in the same application?

You have to use prefix mapping for the Facelets pages in order for this to work. Leave the DEFAULT_SUFFIX with the JSF default of .jsp. Configure the Facelet's VIEW_MAPPINGS parameter: javax.faces.

DEFAULT_SUFFIX . Jsp facelets. VIEW_MAPPINGS *.

Xhtml Faces Servlet javax.faces.webapp. FacesServlet Faces Servlet /faces.

Ah thankyou. I had seen that page but discounted it as I thought it was JSF1. X and out of date.

I had tried a similar strategy as the web. Xml above with a failure - problem my stupid mistake. Will retry thanks!

– Dick Chesterwood Oct 14 '10 at 23:59 FYI: another way is to use a suffix mapping of *.jsf. JSF2 will first scan for XHTML file. If absent, then it will scan for JSP file.

See also stackoverflow. Com/questions/4441713/… – BalusC Oct 14 at 14:49.

The above suggestion did not work at all for me. The wiki page is probably out of date. From the JSF2 specification I got the following parameter that worked: javax.faces.

FACELETS_VIEW_MAPPINGS *. Xhtml instead of: facelets. VIEW_MAPPINGS *.xhtml.

However doing the change to . Jsf mapping did work but a change into that would take a long time to fix but it works well if you don't mind changing urls. – Karl Kildén Nov 30 at 12:30.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions