Our application is supposed to serve multiple devices, from simple to smart-phones, IPhones, touch-screens to normal browsers.
Application is layered, so we can reuse the business and persistence layer. However, we would like to program single presentation layer as well. I know for example that ASP .NET generates different html output based on the browser type. http://msdn.microsoft.com/en-us/library/ms178620.aspx
There are even some sites that promise to transform your site to mobile: http://instantmobilizer.com
Is there a java framework capable of producing the presentation that adapts to client browser and device, so that we do not need to program different presentation layer for each device type? What is the standard way to manage multiple devices support requirement in web applications?
While it's true that you can conceivably generate different markup styles from a single view implementation (e.g. using different XSL transforms selected based on device type), you're still going to end up saddled with the "lowest common denominator" interface.
To take a slightly artificial (and dated) example, say you wanted to generate WML, low-end HTML and high-end XHTML from a single view implementation. Since WML is the most basic of the three, your view would not be able to take advantage of the capabilities of the more advanced representations, beyond the purely cosmetic. In this example, WML can only render very basic forms, whereas high-end XHTML devices can do fancy CSS and javascript stuff.
You want to be able to take advantage of the capabilities of the various classes of device, otherwise it'll just end up looking crappy and primitive on all of them.
When you have devices as diverse as mobile phones, iphones, and desktop browsers, having a single view that satisfies all of them isn't really practical.
In practice, the best option is to detect the device type when the user enters the system, and then set them off on a view sequence tailored to that specific device.