Jochen, Due to XMLRPC-114 I'm trying to use Jetty (6.0.0) as web server for my XMLRPC Server. Since Jetty is embeddable I'm trying to embed it in my application and configure everything (Servlet and mapping) programmatically. I have stumbled into some problems and I want to make sure that I solve these correctly.
WIth the regular WebServer I used: 1. PropertyHandlerMapping 2. Proxy-based, i.e. ProperyHandlerMapping with addHandler(TestRPC.class.getName(), TestRPCImpl.class); 3. Extension enabled 4. Optional content length enabled To setup Jetty should be easy at least according to examples: org.mortbay.jetty.Server server = new org.mortbay.jetty.Server(8080); Context root = new Context(server, "/", Context.SESSIONS); root.addServlet(new ServletHolder(TestServlet), "/*"); server.setSendServerVersion(true); server.start(); server.join(); My question is how can I setup this (with requirements 1-4) without using 1. XmlRpcServlet.properties 2. web.xml as shown under "The XmlRpc Servlet " on http://ws.apache.org/xmlrpc/server.html. I thought that I could use XmlRpcServlet and extend newXmlRpcHandlerMapping, but appearently XmlRpcServlet depends on XmlRpcServletServer since I get a NullPointerExcepption using XmlRpcServlet with Jetty: java.lang.NullPointerException at org.apache.xmlrpc.webserver.XmlRpcServlet.doPost(XmlRpcServlet.java:120) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:447) .... I might be way of here, but wouldn't it be possible to implement XmlRpcServlet so that it can be used with any Web Server that provides a Servlet Container (e.g. Jetty). It should be possible for it to handle extensions (if the web server supports it ) such as "optional content length" and "gzip compression" by adding e.g. response.setHeader("Content-Encoding", "gzip") and likewise with "optional content length". I had a quick IRC chat with the Jetty guys to figure out more: <jimisola> trying to use Jetty for our application that uses Apache XMLRPC (ws.apache.org/xmlrpc). this XMLRPC library support something called "optional content length" <jimisola> I don't know if this a well-defined thing, but I would like to use with Jetty if it supports it as well <gregw> jimisola: do you have a link where I can read about what it is??? or can you explain it here? <jimisola> for more info on "optional content length" see "Streaming Mode" here: http://ws.apache.org/xmlrpc/extensions.html <jimisola> this XML-RPC library also supports compression using gzip - is this something that Jetty handles as well? only thing relevant I found was: http://servlets.com/archive/servlet/ReadMsg?msgId=607222&listName=jetty-discuss <jimisola> on the gzip thing I read something about ResourceHandler - can I use that? <gregw> Well the description is a little high level - it is hard to tell what they mean. <gregw> jimisola: but jetty is a full HTTP/1.1 server <gregw> if content-length is set by the servlet, it will force it to be respected <gregw> if it is not set, and Jetty knows the entire response is in the buffer, it will set it itself <gregw> otherwise it will use chunking, which is probably what they mean by streaming. <gregw> So if this XML-RPC thing is written to the servlet spec, I am 99% sure that Jetty will support the <gregw> HTTP style that it needs <gregw> if not, then I am happy to work with it to make sure it does. <jimisola> ok. I'll will go back to XMLRPC to find some more answers to see how the two will work together. <gregw> As for the gzip encoding.. the servlet can set that and jetty will allow the servlet to send compressed [...] <gregw> Jetty can do compressed content for static content, but it should not stop the XML RPC thing doing its stuff Regards, Jimisola -- View this message in context: http://www.nabble.com/How-to-setup-and-configure-a-Servlet-solution-programmatically-tf2300489.html#a6393210 Sent from the Apache Xml-RPC - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]