There is also WURFL framework that support hundreds of different mobile profiles. And can be used very easily. I have developed application using it in JSP/Servlets.
Earlier Erricson developed Mobile JavaServer Faces kit for the same purpose. It was so good and appreciated by developer that it is now moved to java.net community named Mobile JSF. You can also check this at
https://mobilejsf.dev.java.net.
It has also some mechanism to support multiple mobile profiles, i think, as i have not used it yet.
You can check my post at
http://rightsection.blogspot.com/2008/12/mobile-web-development-its-easy-now.html. I have explained the XHTML-MP, WAP 1.x and WAP 2.0 etc.