From: Nigel C. <nca...@ex...> - 2006-02-09 10:05:41
|
Hi,=20 It's not clear what version of Jetty you are using, but if you are using = Jetty 6 , this is my suggestion : Since you already have added a ServletHandler to the Server, you can = already add a FilterHolder in the ServletHandler because a = ServletHandler can have an array of FilterHolders. Assuming this is your = jetty.xml : <New id=3D"yourServletHandler" = class=3D"org.mortbay.jetty.servlet.ServletHandler"> <Set name=3D"servlets"> <Array = type=3D"org.mortbay.jetty.servlet.ServletHolder"> <Item> <New = class=3D"org.mortbay.jetty.servlet.ServletHolder"> <Set name=3D"name">Default</Set> <Set = name=3D"className">org.mortbay.jetty.servlet.DefaultServlet</Set> </New> </Item> </Array> </Set> you can just add these lines : <Set name=3D"filters"> <Array = type=3D"org.mortbay.jetty.servlet.FilterHolder"> <Item> <New = class=3D"org.mortbay.jetty.servlet.FilterHolder"> ... ... </New> </Item> </Array> </Set> Regards, Nigel ----- Original Message -----=20 From: Jayesh Malondkar=20 To: jet...@li...=20 Sent: Thursday, February 09, 2006 3:14 PM Subject: [jetty-discuss] Need help regarding Jetty. Hi to all of you, I am a newbie in this mailing list. I have a problem while using = Jetty.=20 Any help in this regard, would be appreciated!!. Here is the scenario: I am using Jetty Web server, to start a Http Server. I add a ServletHandler for the server and map the servlets in the = handler. I am manually configuring the server and I am not using any web.xml. Also currently I havent added any WebApplication as I dont need it. Now the problem is that I neeed a FilterHolder. But all I can see is = that to configure a FilterHolder I need a WebApplicationHandler. Now my queries are how to configure filters for the ServletHandler = without using WebApplication or web.xml. =20 (:- Keep Smiling :-)=20 Regards,=20 -Jayesh M. Malondkar=20 |