Skip to main content

Is that possible/good to mix the regular JSF JSP pages and Facelets pages?

2 replies [Last post]
potingwu
Offline
Joined: 2003-06-11

Is that possible/good to mix the regular JSF JSP pages and Facelets pages in one single project?

My use case is, suppose I already have JSF application with several JSF JSP pages. And I want to change the future development by trying to add only Facelets pages to improve the performance. Is that possible I continue to use the same project? Can these different pages navigate to each other? (i.e., jsp <-> xhtml)

I tried this on JSF 1.2 + Facelets 1.1.14 and looks like it's not working! When it navigates to a JSF JSP page, the server reports "javax.servlet.ServletException: Error Parsing /Page.jsp: Error Traced[line: 1] The markup in the document preceding the root element must be well-formed."

Is that still true for JSF 2.0? Will JSF 2.0 integrate the JSP and Facelets better?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Ryan Lubke

webtier@javadesktop.org wrote:
> Is that possible/good to mix the regular JSF JSP pages and Facelets pages in one single project?
>
> My use case is, suppose I already have JSF application with several JSF JSP pages. And I want to change the future development by trying to add only Facelets pages to improve the performance. Is that possible I continue to use the same project? Can these different pages navigate to each other? (i.e., jsp <-> xhtml)
>
> I tried this on JSF 1.2 + Facelets 1.1.14 and looks like it's not working! When it navigates to a JSF JSP page, the server reports "javax.servlet.ServletException: Error Parsing /Page.jsp: Error Traced[line: 1] The markup in the document preceding the root element must be well-formed."
>
It is possible to use JSF 1.2 with both Facelets and JSP in the same
application, but there are restrictions.

See:
http://wiki.java.net/bin/view/Projects/FaceletsFAQ#How_do_I_use_Facelets...
> Is that still true for JSF 2.0? Will JSF 2.0 integrate the JSP and Facelets better?
>
Yes, JSF 2.0 will allow them to exist in the same application no matter
how the FacesServlet is mapped.
> [Message sent by forum member 'potingwu' (potingwu)]
>
> http://forums.java.net/jive/thread.jspa?messageID=315833
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

potingwu
Offline
Joined: 2003-06-11

> See:
> http://wiki.java.net/bin/view/Projects/FaceletsFAQ#How_do_I_use_Facelets...

Yes, they work together perfectly! Thanks for your help!!

Po-Ting