9 Replies Latest reply on Mar 27, 2006 10:18 PM by noicangi

    what is the best IDE to develop portlets?

    angel gonzalez Newbie

      what is the best IDE to develop portlets?

      I use Eclipse, (run packaging with Jboss IDE Eclipse)

        • 1. Re: what is the best IDE to develop portlets?
          rincewind23 Newbie

          Work is currently underway on a plugin for Eclipse which will allow easy creation of portlet projects. see this forum for details: http://www.jboss.com/index.html?module=bb&op=viewforum&f=239

          Cheers,
          KEv.

          • 2. Re: what is the best IDE to develop portlets?
            Alexander Grünewald Newbie

            I develop big portlet applications as JSF web application. This is very easy with eclipse and it's tomcat plugin. Then I deploy this webapp as portlet into jboss portal. The advantage is, that your portlet can run as web app. The disadvantage is, that you can't use all features of JSR 168 like different portlet modes and such stuff.

            Small portlets I develop usually as JSR 168 compatible portlets also using eclipse with an ant buildfile that deploys the portlet app to jboss portal.

            • 3. Re: what is the best IDE to develop portlets?
              noicangi Novice

              please gruenewa, if you have information about building portlets with JSF please post ;)
              thanks

              • 4. Re: what is the best IDE to develop portlets?
                Alexander Grünewald Newbie

                So if you have a running MyFaces web application you should simply add a 'portlet.xml' to the WEB-INF folder. This should specify the correct portlet-class: MyFacesGenericPortlet

                <?xml version="1.0" encoding="UTF-8"?>
                <portlet-app id="librarian" version="1.0">
                 <portlet>
                
                 <portlet-name>LibrarianPortlet</portlet-name>
                 <display-name>Librarian Portlet</display-name>
                 <description>Librarian Portlet</description>
                 <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
                 <expiration-cache>-1</expiration-cache>
                 <init-param>
                 <name>default-view</name>
                 <value>/welcome.jsp</value>
                 </init-param>
                 <supports>
                 <mime-type>text/html</mime-type>
                 <portlet-mode>VIEW</portlet-mode>
                 </supports>
                 <supported-locale>en</supported-locale>
                 <resource-bundle>portlet-info</resource-bundle>
                 <portlet-info>
                 <title>Librarian Portlet</title>
                 <short-title>Librarian</short-title>
                 <keywords>JSF, Portlet</keywords>
                 </portlet-info>
                 </portlet>
                 </portlet-app>
                


                To deploy the app in JBossPortal you have also to add the JBossPortal deployment descriptors 'jboss-app.xml','jboss-portlet.xml' to the WEB-INF folder, as if you would do it when writing a normal portlet.

                This way you can run your app as simple web application (very useful during application development) or as portlet.

                • 5. Re: what is the best IDE to develop portlets?
                  Vince Marco Newbie

                  In addition to JSF, you can also use Tapestry 4.0 to effectively build portlets. This provides the same benefits as JSF, in terms of deploying a project both as a web application and as a portlet.

                  One benefit of Tapestry is its non-JSP view structure. This can also be achieved with JSF by using Facelets (a project at java.net). I also find Tapestry error-handling to be very precise, as well as HTML view templates that can be designed using most web designer tools.

                  Both JSF and Tapestry are viable portlet development frameworks.

                  Vince


                  • 6. Re: what is the best IDE to develop portlets?
                    ilango gurusamy Novice

                    I am a little confused by the term 'portlet framework'. I am a newbie to portlet and I beg to be excused for my naivette.

                    In order to build Portlets, are we talking of a Framework (for example, Struts or Webwork). I associate with these Frameworks especially because i have worked with them in the past.

                    Now are we talking of some other Framework exclusively to build Portlets? Or is it that I can develop Portlets using Struts or Webwork as well.

                    Please explain. I am very grateful to the wise persons here who kindle some interest in me.

                    thanks

                    • 7. Re: what is the best IDE to develop portlets?
                      ilango gurusamy Novice

                       

                      "masternet" wrote:
                      what is the best IDE to develop portlets?

                      I use Eclipse, (run packaging with Jboss IDE Eclipse)


                      Pray, could you explain how you use Eclipse to develop portlets. I am very curious and interested to know.

                      thanks


                      • 8. Re: what is the best IDE to develop portlets?
                        angel gonzalez Newbie

                        (pardon for my English, I'm Spanish)

                        Yes, I use Eclipse Ide to develop my portlets.

                        These are my steps:

                        1 - I create a new project. (I will base on the portlet HellowPortlet example http://labs.jboss.com/portal/index.html?ctrl:id=page.default.downloads&project=portletswap&category=.portlets.samples )

                        2 - I create this directory structure in Eclipse:
                        - src
                        ------ org
                        --------- jboss
                        ----------- portlet
                        --------------- hello
                        -------------------- HelloWorldPortlet.java
                        - META-INF
                        ----application.xml
                        ----MANIFEST.MF

                        - WEB-INF
                        ---- classes
                        ---- jsp
                        --------view.jsp

                        ---- lib
                        ------- explode.jar
                        ------- portal-commons-lib.jar
                        ------- portlet-api-lib.jar

                        ---- helloworld-object.xml
                        ---- jboss-app.xml
                        ---- jboss-web.xml
                        ---- portlet.xml
                        ---- web.xml

                        3- Next, mount all libraries (lib directory)

                        4- Next, press "build path -> use as source folder"
                        in the "src" folder .

                        5- Next, in the properties of the proyect, enable the "pakaging configurations"

                        6- Add this structure to pakaging configuration:

                        helloworldportlet-lib.jar
                        _file: /HelloPortlet/bin/org/jboss/portlet/hello/HelloWorldPortlet.class
                        _prefix: org/jboss/portlet/hello


                        helloworldportlet.war
                        _folder: /HelloPortlet/src/WEB-INF/classes
                        _prefix: WEB-INF/classes

                        _folder: /HelloPortlet/src/WEB-INF/jsp
                        _prefix: WEB-INF/jsp

                        _folder: /HelloPortlet/src/WEB-INF
                        _includes: *.xml
                        _prefix: WEB-INF

                        _file: /HelloPortlet/src/META-INF/MANIFEST.MF
                        _prefix: META-INF

                        helloworldportlet.ear

                        _file: /HelloPortlet/helloworldportlet-lib.jar
                        _prefix:

                        _file: /HelloPortlet/helloworldportlet.war
                        _prefix:

                        _file: /HelloPortlet/src/META-INF/application.xml
                        _prefix: META-INF

                        7- Start Jboss server with Eclipse Ide (debug mode)

                        8- Select the root directoy of the proyect and press run pakaging

                        9- Select helloworldportlet.ear and press deployment->depoly to and select the jboss server session started.

                        10- we finish, very easy http://localhost:8080/portal


                        If there is some problem tell it to me.

                        Bye

                        • 9. Re: what is the best IDE to develop portlets?
                          noicangi Novice

                          masternet, exelente explicacion,

                          if you could add the same explanaition with jsf it will be very usefull. also ajax :P


                          thanks nicolas