views:

634

answers:

4

Is it possible to use Facelets pages and .jsp style ICEfaces pages in the same project? In looking at the ICEFaces Facelets tutorial, the migration appears to be an all-or-nothing switch. Is it possible to support both (for a slow migration)?

A: 

I've never try, but thinking you can write high priority filter to dispatch request between JSP or ICEF. And place to web.xml to intercept all

<filter-mapping>
    <filter-name>MyDispatcher</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
Dewfy
A: 

You can use Facelet and IceFaces together. Facelet is view handler for JSF applications. If you want to use the facelet in your application you have to set it as the viewhandler in faces-config.xml as follows

<application>
<view-handler>
    com.sun.facelets.FaceletViewHandler (com.icesoft.faces.facelets.D2DFaceletViewHandler for icefaces facelet)
</view-handler>
</application>

I think Iceface will be having their default filters and dispatchers .

Jinesh
A: 

I personally found the migration from JSP to facelets pretty simple. I was able to migrate a decent sized app within the span of a day. I would think the added complexity from any hacked together solution will cause you more headaches than just biting the bullet and porting quickly. The debugging features, improved error messages and gained speed are nice pluses.

If I recall correctly, the last talk I saw on JSF 2.0 suggested that Facelets was going to be required going forward.

David Ortiz
jsf2.0 still supports jsp, though it will be deprecated.
jsight
It's my understanding that jsf 2.0 will require jsp if you'd like the use some of the new jsf 2.0 features. So yes you can still *use* jsf 2.0 with jsp but you'll be missing out on a lot of the new stuff.
David Ortiz
+1  A: 

I'm actually trying it right now, but it should work:

http://wiki.java.net/bin/view/Projects/FaceletsFAQ#How_do_I_use_Facelets_and_JSP_in

LightGuard