Why don't you simple use Cocoon for this purpose?
xml.apache.org/cocoon
"Dr. Evil" <[EMAIL PROTECTED]> on 23.10.2001 11:16:31
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
Subject: Opinions on detecting browser type for WML vs. HTML
I am working on a site where the same URL will be hit by both WML and
HTML browsers. Fortunately, with Tomcat, it's very easy to have a
controller servlet which takes all incoming requests and decides to
forward them to various processors. The problem is, how should I make
this servlet decide what to do?
It looks to me like basically every ordinary web browser in use
includes the string "Mozilla" somewhere in its browser type header. I
believe this includes IE, Netscape, Konqueror, Galeon, Opera and
almost all the others.
My current thought is to check for the string "mozilla". If it's
there, you get HTML, and if it's not there, you get WML.
Is this a reasonable approach? I like to do things in a way that is
browser independent, but in this case I don't see how to do it. There
really should be a header sent by the browser listing the MIME types
it accepts, perhaps, but there isn't so I don't know any other
alternative.
Thanks