[thelist] new to servlets

Hassan Schroeder hassan at webtuitive.com
Tue Oct 19 13:09:29 CDT 2004


evolt at mccullough-net.com wrote:

> I have an order servlet that "controls" the ordering process.  I wanted to
> restrict users with certain browsers from getting into the ordering process, so
> I created a detect bservlet, really my first servlet.  I placed the jsp tag for
> the servlet on several pages and the logic to say if certain browser redirect
> to hear.  however I thought if I could include the servlet in the beginning of
> the ordering servlet then I wouldnt have to do it on each and every page. 
> however I am new and not sure how to do this properly.  

You want to use a Filter; see chapter 6 of the Servlet spec.

(Tomcat ships with some example Filters, BTW.)

HTH,
-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.




More information about the thelist mailing list