[opencms-dev] OpenCMS - JSF integration

Olaitan Olamilehin olaitan.olamilehin at moremr.com
Fri Jul 16 10:58:21 CEST 2010


Hi Thomas,

Thanks so much for your help and for shining some light on what is 
possibly happening behind the scenes.

In the end, JSF 1.1 worked as Martin suggested in a previous mail but 
JSF 1.1 does not help in my case because the UI component library I was 
planning to use(i.e *primefaces*) only supports JSF 1.2 and 2.0. In 
addition,  JSF 1.1 does not really provide an improvement over JSP 
because am not able to use facelets which is the main feature I was 
interested in because using facelets allows the use of component 
libraries which reduces low-level programming of the view layer, aids 
rapid development and facilitates the use of AJAX.

Regarding using JSF 1.2 with a newer servlet-api version, am currently 
using servlet-api 2.5 which is the current stable version and it still 
does not work with OpenCMS. Do you still remember what version you 
tested with?

Thanks once again for your tips. I have actually added an enhancement 
entry to OpenCMS bugzilla page. I really hope OpenCms/Alkacon can 
consider supporting facelets.

Regards,
Olaitan.

On 07/15/2010 07:24 PM, Thomas Göttlich wrote:
> Hi,
>
> AFAIK JSF 2.x uses facelets under the hood and this seems to 
> contradict the OpenCMS way.
>
> As fas as I could track the issue (I also tried to use JSF 1.2 with 
> facelets), the problem lies with facelets wanting to read the XHTML 
> files from the RFS and OpenCMS might not have downloaded them already.
> Maybe you could get facelets to load the files via OpenCMS in order to 
> access the VFS.
>
> Also note that I got JSF 1.2 to run with OpenCMS by supplying a newer 
> servlet-api version (if I remember correctly).
> JSF needed to use JSPs , however, so no improvement here.
>
> Unfortunately I can't provide more information since using JSF without 
> facelets was a no go and thus my tests (and subsequent documentation) 
> were very short.
>
> Hope that helps anyway.
>
> 2010/7/15 Olaitan Olamilehin <olaitan.olamilehin at moremr.com 
> <mailto:olaitan.olamilehin at moremr.com>>
>
>     Hi Martin,
>
>     Thanks so much for your reply. Please see comments below.
>
>     Regards,
>     Olaitan .
>
>
>     On 07/15/2010 09:11 AM, Martin Höller wrote:
>>     Hi!
>>
>>     Am Montag, 12. Juli 2010 12:03:42 schrieb Olaitan Olamilehin:
>>        
>>>     Hi Everyone,
>>>
>>>     Any ideas on how to integrate JSF into OpenCMS so that .jsf files are
>>>     used as the view layer instead of .jsp template files?
>>>
>>>     I tried a small setup description on the OpenCMS wiki(
>>>     http://opencms-wiki.org/Java_Server_Faces_(JSF)  <http://opencms-wiki.org/Java_Server_Faces_%28JSF%29>
>>>     <http://opencms-wiki.org/Java_Server_Faces_%28JSF%29>) but I could not
>>>     get it to work. The jsf tags are not translated/transformed to html so
>>>     my test page is always blank and I dont get any errors in the logs.
>>>
>>>     Suggestions and tips are warmly welcome.
>>>          
>>     Disclaimer: I'm currently not using OpenCms, so my help will be very limited
>>     ATM.
>>
>>     It seems not many people are using OpenCms with JSF and Alcacon is not
>>     interested in it, which is disappointing, as JSP is a technology which is
>>     going to die (sooner or later).
>>        
>     *I totally agree with you. It is really sad that OpenCms/Alkacon
>     can not see that jsp is getting outdated. Especially with the
>     advent of component based technologies and flexible AJAX
>     frameworks out there. I really hope they can re-consider using JSF
>     as an alternative to JSP.*
>
>>     However, the last time I used OpenCms with JSF it worked. All I had to do was
>>     doing all the configuration issues described on the mentioned wiki page.
>>     Note, that only JSF 1.1 is going to work, which is a  pretty outdated
>>     version! Which version are you using?
>>        
>     *Actually am currently using the latest version of JSF which is
>     2.0.3. Maybe this is the problem, I will try out JSF 1.1 then( *I
>     hope I can still find it since it is really outdated :-) *). The
>     only limitation I have now is that the UI component library am
>     using is Primefaces and it only supports JSF 1.2 and JSF 2.0 so
>     maybe I would have to try out some other UI component library. By
>     the way, did you use any additional UI component library similar
>     to primefaces? and if you did, what **component **library did you
>     use?*
>
>>     If JSF tags are not translated, it is a common mistake to forget to include
>>     accoring namespaces at the beginning of the page. Did you do this?
>>        
>     *Yes I did include the required namespaces using *@taglib* and I
>     also tried using facelets approach (i.e using .xhtml and including
>     the namespaces as e.g * xmlns:h, xmlns:f*) but still got a blank
>     page with empty html source. Thanks once again for your help. I
>     will try JSF 1.1 and will let you know how it turns out.*
>>     hth,
>>     - martin
>>        
>>
>>
>>
>>     _______________________________________________
>>     This mail is sent to you from the opencms-dev mailing list
>>     To change your list options, or to unsubscribe from the list, please visit
>>     http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
>
>     _______________________________________________
>     This mail is sent to you from the opencms-dev mailing list
>     To change your list options, or to unsubscribe from the list,
>     please visit
>     http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20100716/02b0b5ee/attachment.htm>


More information about the opencms-dev mailing list