> From: Sudarson Roy Pratihar [mailto:[EMAIL PROTECTED]]
>
> that's fine. But I don't want to throw output from jsp directly into
> response, in stead I want to determine the client agent type and
> accordingly apply style sheet on it to convert into some format that
is
> understandable to the agent. I also don't want to depend on whether
client
> understand xml content and style sheet directly (as IE 5.0
recognizes).
>
> Any suggestion ?
I highly recommend that you look at the Maverick MVC framework, which
was designed to handle exactly this case. The basic concept is
Struts-like, but with a lot more power and flexibility. You can define
simple "Shunts" which choose between different views based on request
characteristics like user agent. For example, this snippet from a
hypothetical Maverick config file defines a "query" command/URL:
<command name="query">
<controller class="my.pkg.QueryController"/>
<view type="domify" mode="IE">
<transform path="ie_version.xsl">
</view>
<view type="domify" mode="Netscape">
<transform path="ns_version.xsl">
</view>
</command>
This example uses the "domify" package to automatically adapt your
JavaBeans model to a DOM representation which is fed directly to the
XSLT engine, so there is no need to generate XML with JSP (although you
can if you want to). You can perform multiple iterative
transformations, too.
The distribution includes an example of a Shunt which handles
internationalization based on the Accept-Language. It's all Open Source
and covered by an Apache-style license.
Take a look: http://mav.sourceforge.net
Jeff Schnitzer
[EMAIL PROTECTED]
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html