5 Replies Latest reply on Feb 3, 2010 12:17 PM by Peter Johnson

    Page not found goes to JBoss Portal

    Kevin Johnson Newbie

      How do I completely capture all navigation so that the default JBoss Portal can never be displayed to the user?  Since all navigation within the portal is routed to the PortalServletWithPathMapping, adding the 404 error-code element doesn't have any effect.  No matter what type of error occurs, I never want the user to see the JBoss page.

       

      I am running JP 2.7 on AS 4.2.3.

       

      Kevin

        • 1. Re: Page not found goes to JBoss Portal
          vineet tripathi Newbie

          Hi Kevin,

           

          Though your question is not crystal clear to me, I am trying to answer..lets see if it makes sense to you:

           

          "The default behavior of JBoss portal is when you try to access a page and its not found the JBoss portal redirects the user to default page of the default portal".

           

          You can create your own portal and mark it as default and then when a page is not found people will land up on your custom portal.

           

          Thanks

          Vineet

          • 2. Re: Page not found goes to JBoss Portal
            Kevin Johnson Newbie

            We already have a custom portal, and navigation to the default URI (something like http://server/portal) goes directly to our login screen.  But once logged in, entering an invalid URL in the browser's address line will forward to the JBoss Portal.  We want 404 errors to go to our custom portal's default page, not to JBoss.

             

            Is it possible that something was not defined properly, and our portal isn't really the "default"?  I was not the initial developer, so I'm not sure what to check to verify it.  I do know that the method of redirecting to our login page is done by adding (or modifying) the login-config element to the jboss-portal.sar/portal-server.war/WEB-INF/web.xml.

             

            Kevin

            • 3. Re: Page not found goes to JBoss Portal
              Peter Johnson Master

              I gave a presentation on replacing the default portal with a custom portal at JBossWorld 2008, perhaps that will help:

              http://community.jboss.org/wiki/CustomPortal

              • 4. Re: Page not found goes to JBoss Portal
                Kevin Johnson Newbie

                Thanks, Peter.  Your presentation looks extremely helpful, but it's very likely that our custom portal was originally done completely wrong -- I'm not sure there was any clear direction on how to do it when we started.  I hope it's not too much trouble to do it the right way.

                 

                Our portal definition is in its own EAR with the xxx-object.xml not named "default-object.xml".  Portlets are deployed within their own EAR or WAR files, allowing for third-party development of future portlets.  There are modifications, as mentioned previously, to the jboss-portal.sar/portal-server.war/WEB-INF/web.xml such as definitions of login-related servlets and the login form info.

                 

                This doesn't sound anything like what you describe in your presentation.

                 

                Kevin

                • 5. Re: Page not found goes to JBoss Portal
                  Peter Johnson Master
                  What you have is fine, but now what you need to do is modify the global default-object.xml file to remove the the JBoss-specific stuff and replace it with your own. I suspect that replacing the existing default home with your 404 page should do the trick - just remove the existing portlets from the home page and replace it with a simple portlet that displays the 404. And of course change the theme.