9 Replies Latest reply on Jul 10, 2007 9:12 AM by Thomas Heute

    Custom Portal URL

    Casey Boyd Novice

      It's time for another dumb question from Indy...

      Portal: 2.4
      MySQL
      JB AS: 4.0.5

      I have a custom Portal that I access through the following URL

      http://localhost:8080/portal/portal/MyPortal


      I would like to configure it to be...

      http://localhost:8080


      I tried changing the jboss-web.xml, but that didnt work...

      Can someone point me in the right direction?

      Thanks

      Indy

        • 1. Re: Custom Portal URL
          Sohil Shah Master

          Indy-

          Besides the context change to root level in jboss-web.xml file of portal-server.war file, also check and make sure the Root.war file
          inside of core tomcat sar file is not hogging up the "/" context either


          I would recommend set that context to something like "tomcat-root"


          Thanks

          • 2. Re: Custom Portal URL
            Casey Boyd Novice

            Where would I change the context for the root.war?

            There is web.xml in the WEB-INF directory inside the war, but there isnt a "<context-root>" xml element.

            Thanks

            Indy

            • 3. Re: Custom Portal URL
              Sohil Shah Master

              Indy-

              You need to add a jboss-web.xml to the WEB-INF folder under the Root.war and then set the <context-root> value to not at '/'

              Thanks

              • 4. Re: Custom Portal URL
                Casey Boyd Novice

                I added a jboss-web.xml and added <context-root>/root</context-root> within the root.war/WEB-INF

                Then changed the jboss-web.xml under the portal-server.war\WEB-INF to <context-root></context-root>

                This removed one of the portals...

                Is was...

                
                http://localhost:8080/portal/portal/MyPortal
                
                



                Now it is...

                
                http://localhost:8080/portal/MyPortal
                
                


                Is there anyway to remove the other "portal" to...

                
                http://localhost:8080/MyPortal
                
                


                Thanks for your help...

                Indy

                • 5. Re: Custom Portal URL
                  Thomas Heute Master

                  Nope, unless it is the default portal

                  http://localhost:8080
                  is the same as
                  http://localhost:8080/portal/default

                  For CMS content it is always accessible at:
                  http://localhost:8080/content/*
                  (CMS content is shared between portals)

                  • 6. Re: Custom Portal URL
                    Antoine Herzog Master

                    I have opened a jira to enhance the documentation.

                    http://jira.jboss.com/jira/browse/JBPORTAL-1323


                    Following to set that "no portal" in url, comes the question : how to define MyPortal as the default portal.

                    seems not possible, without changing the jboss portal default-object.xml in the conf folder in jboss-portal.sar:
                    put MyPortal description in this file.

                    not really clean, as it modify things in the jboss portal package, just for saying MyPortal is the default one.

                    I tried also just to suppress this default-object.xml (for the default portal from jboss).
                    was hoping that MyPortal is the only one defined, so it is the default.

                    Then the default command factory throws an exception :

                    01:40:57,078 ERROR [[PortalServletWithPathMapping]] Servlet.service() for servlet PortalServletWithPathMapping threw exception
                    java.lang.IllegalStateException: Default portal does not exist
                     at org.jboss.portal.core.model.portal.DefaultPortalCommandFactory.doMapping(DefaultPortalCommandFactory.java:76)
                     at sun.reflect.GeneratedMethodAccessor224.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


                    don't know why yet.

                    is there another way ?




                    • 7. Re: Custom Portal URL
                      Xi HUANG Newbie

                      I am using a workaround as follows:

                      1. "destroy" the "default" portal
                      2. "rename" the "MyPortal" portal to "default"

                      • 8. Re: Custom Portal URL
                        Xi HUANG Newbie

                        If there is an option "rename" for the default 3 portals, that will be easy to set another portal as default.

                        • 9. Re: Custom Portal URL
                          Thomas Heute Master

                          The admin portal shouldn't be renamed since the link in the header points to it.

                          To select the default portal, it would actually be easy to add it to the GUI (core-admin). But not yet in the XML descriptors (there is currently no way to set properties on a portal parent via XML.