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.
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?
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.