You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Scrut Inizer <sc...@hotmail.com> on 2006/05/29 23:13:04 UTC

Turning a MyFaces web application into a portlet?

Hello everyone,

I have written a small stand-alone web-application utilizing MyFaces and 
Torque. It runs fine in a Tomcat.
Now I would like to turn this application into a JSR-168 compliant portlet 
that runs in Jetspeed2

As someone who is rather new to the Jetspeed product and portlet 
development, I have searched for documentation explaining what I need to do 
now.
Unfortunately, I didn't find that. Well - I found some pieces but they 
didn't get me to my destination.

This is why I hope that someone here will be so kind as to explain to me 
step by step how I turn my little web-application into a JSR-168 compliant 
portlet and run it in Jetspeed2.

Thank you so much!

scrut



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Turning a MyFaces web application into a portlet?

Posted by Matthew Ryan <ma...@matthewryan.info>.
Hey Scrut,


You should go and download :

Portlets and Apache Portals
by Stefan Hepper, Peter Fischer, Stephan Hesmer, Richard Jacob, David Taylor

Somehow the publishing of the book was cancelled at the end but a downloadable
PDF of the book is available. I don't have the link but with a little diligence
you will find it.

Really great book. I worked through it and found it really nice. No downloadable
code samples though.

cheers

Matthew




Quoting Scrut Inizer <sc...@hotmail.com>:

> Hello everyone,
>
> I have written a small stand-alone web-application utilizing MyFaces and
> Torque. It runs fine in a Tomcat.
> Now I would like to turn this application into a JSR-168 compliant portlet
> that runs in Jetspeed2
>
> As someone who is rather new to the Jetspeed product and portlet
> development, I have searched for documentation explaining what I need to do
> now.
> Unfortunately, I didn't find that. Well - I found some pieces but they
> didn't get me to my destination.
>
> This is why I hope that someone here will be so kind as to explain to me
> step by step how I turn my little web-application into a JSR-168 compliant
> portlet and run it in Jetspeed2.
>
> Thank you so much!
>
> scrut
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Turning a MyFaces web application into a portlet?

Posted by Patrick McCabe <pa...@gmail.com>.
Hi Scrut

Have you looked at http://portals.apache.org/bridges/

How new are you to using Jetspeed ? Have you gone through the tutorial for
setting up the Simple Portlet ?

Basically, all you have to do to turn your app into a portlet is to
configure your portlet.xml file to use the myfaces portlet and place "
portals-bridges-jsf-1.0.jar" in your applications WEB-INF/lib folder.  This
is what I have for my portlet.xml in a test application.  Note the
following:
<portlet-class>org.apache.portals.bridges.jsf.FacesPortlet</portlet-class>

<?xml version="1.0" encoding="UTF-8"?>
<portlet-app id="testJSF" version="1.0">
    <portlet id="testJSF">
        <init-param>
            <name>ViewPage</name>
            <value>/userLogin.jsp</value>
        </init-param>
        <portlet-name>testJSF</portlet-name>
        <display-name>testJSF</display-name>
        <description>This is a simple portlet</description>
        <portlet-class>org.apache.portals.bridges.jsf.FacesPortlet
</portlet-class>
        <expiration-cache>-1</expiration-cache>
        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>VIEW</portlet-mode>
            <portlet-mode>EDIT</portlet-mode>
            <portlet-mode>HELP</portlet-mode>
        </supports>
        <portlet-info>
            <title>Test JSF</title>
            <short-title>testing jsf</short-title>
        </portlet-info>
    </portlet>
</portlet-app>

On 5/29/06, Scrut Inizer <sc...@hotmail.com> wrote:
>
> Hello everyone,
>
> I have written a small stand-alone web-application utilizing MyFaces and
> Torque. It runs fine in a Tomcat.
> Now I would like to turn this application into a JSR-168 compliant portlet
> that runs in Jetspeed2
>
> As someone who is rather new to the Jetspeed product and portlet
> development, I have searched for documentation explaining what I need to
> do
> now.
> Unfortunately, I didn't find that. Well - I found some pieces but they
> didn't get me to my destination.
>
> This is why I hope that someone here will be so kind as to explain to me
> step by step how I turn my little web-application into a JSR-168 compliant
> portlet and run it in Jetspeed2.
>
> Thank you so much!
>
> scrut
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

Re: Turning a MyFaces web application into a portlet?

Posted by Ralph Goers <Ra...@dslextreme.com>.
Also, you might have to make sure your view handler works when run as a 
portlet. We are using Facelets and have to specify the 
FaceletPortletViewHandler (actually, you can get away without this in 
Jetspeed but it will fail in other portals).

Ralph

Ralph Goers wrote:
> Actually, portal-bridges is completely unnecessary with MyFaces.  
> MyFaces comes with MyFacesGenericPortlet.  Just configure your 
> portlet.xml to use that.:
>
> <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class> 
>
>
>
>
> Patrick McCabe wrote:
>> Hi Scrut
>>
>> Have you looked at http://portals.apache.org/bridges/
>>
>> How new are you to using Jetspeed ? Have you gone through the 
>> tutorial for
>> setting up the Simple Portlet ?
>>
>> Basically, all you have to do to turn your app into a portlet is to
>> configure your portlet.xml file to use the myfaces portlet and place "
>> portals-bridges-jsf-1.0.jar" in your applications WEB-INF/lib 
>> folder.  This
>> is what I have for my portlet.xml in a test application.  Note the
>> following:
>> <portlet-class>org.apache.portals.bridges.jsf.FacesPortlet</portlet-class> 
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <portlet-app id="testJSF" version="1.0">
>>    <portlet id="testJSF">
>>        <init-param>
>>            <name>ViewPage</name>
>>            <value>/userLogin.jsp</value>
>>        </init-param>
>>        <portlet-name>testJSF</portlet-name>
>>        <display-name>testJSF</display-name>
>>        <description>This is a simple portlet</description>
>>        <portlet-class>org.apache.portals.bridges.jsf.FacesPortlet
>> </portlet-class>
>>        <expiration-cache>-1</expiration-cache>
>>        <supports>
>>            <mime-type>text/html</mime-type>
>>            <portlet-mode>VIEW</portlet-mode>
>>            <portlet-mode>EDIT</portlet-mode>
>>            <portlet-mode>HELP</portlet-mode>
>>        </supports>
>>        <portlet-info>
>>            <title>Test JSF</title>
>>            <short-title>testing jsf</short-title>
>>        </portlet-info>
>>    </portlet>
>> </portlet-app>
>>
>> On 5/29/06, Scrut Inizer <sc...@hotmail.com> wrote:
>>>
>>> Hello everyone,
>>>
>>> I have written a small stand-alone web-application utilizing MyFaces 
>>> and
>>> Torque. It runs fine in a Tomcat.
>>> Now I would like to turn this application into a JSR-168 compliant 
>>> portlet
>>> that runs in Jetspeed2
>>>
>>> As someone who is rather new to the Jetspeed product and portlet
>>> development, I have searched for documentation explaining what I 
>>> need to
>>> do
>>> now.
>>> Unfortunately, I didn't find that. Well - I found some pieces but they
>>> didn't get me to my destination.
>>>
>>> This is why I hope that someone here will be so kind as to explain 
>>> to me
>>> step by step how I turn my little web-application into a JSR-168 
>>> compliant
>>> portlet and run it in Jetspeed2.
>>>
>>> Thank you so much!
>>>
>>> scrut
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Turning a MyFaces web application into a portlet?

Posted by Ralph Goers <Ra...@dslextreme.com>.
Actually, portal-bridges is completely unnecessary with MyFaces.  
MyFaces comes with MyFacesGenericPortlet.  Just configure your 
portlet.xml to use that.:

<portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>



Patrick McCabe wrote:
> Hi Scrut
>
> Have you looked at http://portals.apache.org/bridges/
>
> How new are you to using Jetspeed ? Have you gone through the tutorial 
> for
> setting up the Simple Portlet ?
>
> Basically, all you have to do to turn your app into a portlet is to
> configure your portlet.xml file to use the myfaces portlet and place "
> portals-bridges-jsf-1.0.jar" in your applications WEB-INF/lib folder.  
> This
> is what I have for my portlet.xml in a test application.  Note the
> following:
> <portlet-class>org.apache.portals.bridges.jsf.FacesPortlet</portlet-class> 
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <portlet-app id="testJSF" version="1.0">
>    <portlet id="testJSF">
>        <init-param>
>            <name>ViewPage</name>
>            <value>/userLogin.jsp</value>
>        </init-param>
>        <portlet-name>testJSF</portlet-name>
>        <display-name>testJSF</display-name>
>        <description>This is a simple portlet</description>
>        <portlet-class>org.apache.portals.bridges.jsf.FacesPortlet
> </portlet-class>
>        <expiration-cache>-1</expiration-cache>
>        <supports>
>            <mime-type>text/html</mime-type>
>            <portlet-mode>VIEW</portlet-mode>
>            <portlet-mode>EDIT</portlet-mode>
>            <portlet-mode>HELP</portlet-mode>
>        </supports>
>        <portlet-info>
>            <title>Test JSF</title>
>            <short-title>testing jsf</short-title>
>        </portlet-info>
>    </portlet>
> </portlet-app>
>
> On 5/29/06, Scrut Inizer <sc...@hotmail.com> wrote:
>>
>> Hello everyone,
>>
>> I have written a small stand-alone web-application utilizing MyFaces and
>> Torque. It runs fine in a Tomcat.
>> Now I would like to turn this application into a JSR-168 compliant 
>> portlet
>> that runs in Jetspeed2
>>
>> As someone who is rather new to the Jetspeed product and portlet
>> development, I have searched for documentation explaining what I need to
>> do
>> now.
>> Unfortunately, I didn't find that. Well - I found some pieces but they
>> didn't get me to my destination.
>>
>> This is why I hope that someone here will be so kind as to explain to me
>> step by step how I turn my little web-application into a JSR-168 
>> compliant
>> portlet and run it in Jetspeed2.
>>
>> Thank you so much!
>>
>> scrut
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Turning a MyFaces web application into a portlet?

Posted by Patrick McCabe <pa...@gmail.com>.
Hi Scrut

Have you looked at http://portals.apache.org/bridges/

How new are you to using Jetspeed ? Have you gone through the tutorial for
setting up the Simple Portlet ?

Basically, all you have to do to turn your app into a portlet is to
configure your portlet.xml file to use the myfaces portlet and place "
portals-bridges-jsf-1.0.jar" in your applications WEB-INF/lib folder.  This
is what I have for my portlet.xml in a test application.  Note the
following:
<portlet-class>org.apache.portals.bridges.jsf.FacesPortlet</portlet-class>

<?xml version="1.0" encoding="UTF-8"?>
<portlet-app id="testJSF" version="1.0">
    <portlet id="testJSF">
        <init-param>
            <name>ViewPage</name>
            <value>/userLogin.jsp</value>
        </init-param>
        <portlet-name>testJSF</portlet-name>
        <display-name>testJSF</display-name>
        <description>This is a simple portlet</description>
        <portlet-class>org.apache.portals.bridges.jsf.FacesPortlet
</portlet-class>
        <expiration-cache>-1</expiration-cache>
        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>VIEW</portlet-mode>
            <portlet-mode>EDIT</portlet-mode>
            <portlet-mode>HELP</portlet-mode>
        </supports>
        <portlet-info>
            <title>Test JSF</title>
            <short-title>testing jsf</short-title>
        </portlet-info>
    </portlet>
</portlet-app>

On 5/29/06, Scrut Inizer <sc...@hotmail.com> wrote:
>
> Hello everyone,
>
> I have written a small stand-alone web-application utilizing MyFaces and
> Torque. It runs fine in a Tomcat.
> Now I would like to turn this application into a JSR-168 compliant portlet
> that runs in Jetspeed2
>
> As someone who is rather new to the Jetspeed product and portlet
> development, I have searched for documentation explaining what I need to
> do
> now.
> Unfortunately, I didn't find that. Well - I found some pieces but they
> didn't get me to my destination.
>
> This is why I hope that someone here will be so kind as to explain to me
> step by step how I turn my little web-application into a JSR-168 compliant
> portlet and run it in Jetspeed2.
>
> Thank you so much!
>
> scrut
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>