Yes, if you are using a lot of non-standard jsp tags, then converting
to facelets will require a lot of work to port those tags to JSF.
And you cannot include a jsp file into a facelets xhtml file -- when
facelets is processing an xhtml file, it doesn't use the jsp compiler.

If you are only using a lot of non-standard jsf tags, then it's
trivial to convert a JSF tld to a facelet taglib.xml file -- actually
you'd convert the faces-config.xml data to the taglib.xml file --
there are scripts out there that will do this for you automatically
for JSF tags that don't already have publically-published taglib.xml
files.

If it's just a matter of wanting to use some JSP pages with some
JSF/facelet pages, facelets can also support both page types at the
same time.   xhtml files will be processed with facelets and .jsp(x)
files can be processed with the standard view handler.

On 9/12/06, David Delbecq <[EMAIL PROTECTED]> wrote:
Hello, and thank for pointing out this article on jsp/jsf flaws.
However, getting in the docs of facelets, i see to 2 points preventing
us to go facelets, maybe your experience can lighten this a bit, if am
not abusing your time.
1) facelets use .taglib.xml taglib definition that are not the same as
the jsp's .tld file, unfortunately, requiring a new taglib for facelet,
the jsp taglib is not wrappable
2) the ui:include tag can only include other facelets, templates or
plain XML/XHTML documents. It can not include a .jsp
As a matter of fact, it means
1) all our struts based code is not usable in a facelets context as
there is no facelets based struts tags
2) because there is no possibility to include a JSP in the result tree,
we can't keep our existing jsp part outside facelets and just include them

Am i right in my guess that JSPs can not be easily converted to
facelets, except if they were only using the jsp and jstl tags?

Mike Kienenberger a écrit :
> If you want details on the JSF/JSP issues, see this article:
>
> http://www.onjava.com/pub/a/onjava/2004/06/09/jsf.html
>
>
> As for converting to facelets, facelets excels at templating.
>
>
>
> On 9/11/06, David Delbecq <[EMAIL PROTECTED]> wrote:
>> Thank you. It's strange, lots of docs i saw on the net about JSF do such
>> things as <tag><JSF component/></tag> without problem, it looks very
>> curious to me :/ Or maybe i read mistakenly :(
>> I'll take a look at facelets, but not sure it will be easy to convert
>> all our jsp to facelets as it uses a templating system. :)
>> Martin Marinschek a écrit :
>> > Hi David,
>> >
>> > it's inherent to the JSP and JSF 1.1. interaction that this happens -
>> > you could call it a bug by design.
>> >
>> > things you can do, easiest first:
>> >
>> > - use f:verbatim-tags around your HTML-Code you embed in JSF-tags
>> > (simple but ugly)
>> > - use the MyFaces htmlTag tag to emit some of the HTML-Tags
>> > - use the htmlTag-Library to emit HTML-tags
>> > - switch over to Facelets for view-definitions(relatively simple and
>> > very recommendable)
>> > - switch over to JSF 1.2 (well, if you want to use Tomcat 5.5, you'd
>> > still have to use facelets)
>> >
>> > regards,
>> >
>> > Martin
>> >
>> > On 9/11/06, David Delbecq <[EMAIL PROTECTED]> wrote:
>> >> Hello,
>> >>
>> >> I thought, in JSP, when i write
>> >> <h:form id="blabla">
>> >> <div><h:outputText value="test"/></div>
>> >> </h:form>
>> >>
>> >> I would get something like this
>> >>
>> >> <FORM>
>> >> ...
>> >> <div> .... test ... </div>
>> >> ...
>> >> </FORM>
>> >> that is, the content of outputText "test" is placed at same
>> position of
>> >> corresponding tag.
>> >>
>> >> However, running such a JSP, is get the following output
>> >>
>> >> <FORM>
>> >> ...test...
>> >> <div></div>
>> >> ...
>> >> </FORM>
>> >>
>> >> That is, the outputText is rendered immediatly inside the h:form, and
>> >> not where is was designed in the JSP, is there a reason for this?
>> Am i
>> >> forbidden to use html tags inside an h:form?? Is that a bug?
>> >>
>> >
>> >
>>
>>


Reply via email to