----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

     I'm working on a couple of browser detection routines for use with
my servlets.  Since JServ and Tomcat are both strict adherents to the
Sun Servlet specs, I was wondering from others how I might implement
this.
     Frankly the fact that there is no simple, unified client detection
API in the servlet API (that I am aware of) is laughable.  If I am
missing something, please let me know so that I don't duplicate
efforts.  ASPs have the browscap object.  It seems to me that everyone
else, including the JSP/Servlet community, is reinventing the wheel
every time.
     At any rate, I had simply made some interfaces and a default
implementation so that, like the servlet API, no one was locked into a
particular setup but the API remains constant.  However, everything I
have been doing so far requires the user agent string to be passed in a
constructor.  I would think that a cleaner implementation would be to
simply add it as a method of the HttpServletRequest interface (eg.
request.getUserAgent().isNetscape().  But that breaks the spec and you
would need an interface on top of the servlet API.
     Any suggestions?  I would like to implement something that would
seem  the most "logical" to many people.

- Miles Elam


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to