6 Replies Latest reply on Feb 27, 2006 3:28 AM by Jouni Rajala

    defining own portal with own portlets

    mohan vj Newbie

      Hi,

      I'd like to create my own Portal with it's own Portlets.
      I'd like to display my own self designed portal not the default jboss portal pages,in my portal page
      I would like to incorporate my own portlets and i want to refer my portal as URL://localhost:8080//myportal not URL://localhost:8080//portal
      Can anybody plz explain me the procedure or tutorial is great help to me.


      Thanks,

      Mohan

        • 2. Re: defining own portal with own portlets
          mohan vj Newbie

          Keletappi,
          i am using "jboss-portal-2.2.0-bundled" and i could not find local.properties
          file there to edit

          • 3. Re: defining own portal with own portlets
            Jouni Rajala Newbie

            I haven't tried it because I don't find it neccessary. If that document is correct, you have to compile from sources to change context root.

            • 4. Re: defining own portal with own portlets
              Ivan Latysh Newbie

              Let me try to help you with it.

              Since you are using "jboss-portal-2.2.0-bundled" it won't be so complicated.

              An advice, make a copy of jboss-portal-2.2.1RC2-bundled/server/default directory amd make jboss-portal-2.2.1RC2-bundled/server/myportal. now when yourun JBoss run it run.bat -c myportal. This way you always have an original portal copy handy.

              First of all you must read the docs, where you will find that portal configured in a single file: /jboss-portal.sar/conf/data/default-object.xml (this path is relative to your server instance, for default server will be jboss-portal-2.2.1RC2-bundled/server/default)

              You can modify this file and add one more portal instance or simply change default portal. But there is a catch :

              <portal>
               <portal-name>default</portal-name>

              the portal with name default must be there.

              Now let's change portal mapping.
              Check /deploy/jbossweb-tomcat55.sar and see if you have ROOT.war there, if you do - delete it.

              Now let's modify portal mapping, edit the file: /deploy/jboss-portal.sar/portal-server.war/WEB-INF/jboss-web.xml
              and modify context-root tag. To map portal to server root simply change it to
              <jboss-web>
              ...
              <context-root>/</context-root>
              

              or
              <jboss-web>
              ...
              <context-root/>
              


              Now you can access your portal on http://localhost:8080/default, as far as I know you won't be able to change it to http://localhost:8080/myportal since default portal instance must be configured. But if you configure more that 1 portal instance you can have 2 portals http://localhost:8080/default and http://localhost:8080/myportal but anyone who come to http://localhost:8080/ will automatically get http://localhost:8080/default.

              Now about layout and themes: have a look at the file \deploy\jboss-portal.sar\portal-core.war\WEB-INF\portal-layouts.xml
              and \deploy\jboss-portal.sar\portal-core.war\WEB-INF\portal-themes.xml
              And create your own layout and theme based on one of the existing. It is quite simple.

              I hope it can answer some of your questions.

              • 5. Re: defining own portal with own portlets
                mohan vj Newbie

                Hi Ivan,

                Thanks a lot !!!!

                Awesome!!,Now I can able to run on my own portal instance...
                Thanks again

                Mohan

                • 6. Re: defining own portal with own portlets
                  Jouni Rajala Newbie

                  IMHO this should be somewhere in WiKi of documentation.