3 Replies Latest reply on Sep 16, 2008 3:47 PM by Philippe Sevestre

    JBoss Portal and mobile devices?

    Troy Sellers Newbie


      Hi,

      I was wondering if anyone had an idea on how to go about implementing a set of portal pages that would customise its output depending on the device viewing?
      We want to create a portal that is viewable by both a web browser and browsers on mobile devices (iphone, win mobile, black berry etc).

      What would be the technique of responding to a request with the correct portal page, depending on the device making the request?

      Cheers,
      Troy

        • 1. Re: JBoss Portal and mobile devices?
          Philippe Sevestre Newbie

          I think on two different ways to accomplish this:

          1. mod_rewrite magic

          If you use Apache in front of JBoss, you can use mod_rewrite in order to redirect the user to different portals depending on user agent. You have more customization, but keeping the content in sync for both portals can be cumbersome.

          2. Adaptive layout/theme

          You can include logic into your layout jsp pages to render your pages according to the informed user-agent.

          • 2. Re: JBoss Portal and mobile devices?
            Troy Sellers Newbie

            Hi psevestre,

            Thanks fort the reply. I agree that the management of two different portals is not the best solution, two sets of content is not the desired outcome.

            Does the logic need to be included in the theme / layout? I was hoping there would be a means of intercepting the request, calling WURFL to get device details, and then redirecting to the correct portal page. This would allow us to maintain separate portal pages for each category of mobile device we want to support.

            Have you any knowledge of a way to do this?

            Cheers,
            Troy

            • 3. Re: JBoss Portal and mobile devices?
              Philippe Sevestre Newbie

              Troy,

              Maybe a mod-rewrite + some logic would work:

              1. Use mod_rewrite to handle the redirect based on user agent

              2. In your layout, you can define content areas which would be enabled or not based on the supported device features, as informed by WURFL.

              For instance, you can have a "generic" and "nokia pda" areas defined in your layout descriptor, but you would only include the second one if the device were a "nokia pda"

              BTW: Since a theme/layout is just a regular web-app, you can use regular MVC patterns, that is, you can point to a servlet where you'd put your logic and then forward to a specific layout jsp. The same applies to CSS and theme-related resources such as images.