>> I think that init should handle contentLengthOptional (and possibly other >> params) and this way one would not have to subclass XmlRpcServlet just >> like >> one does not have to subclass to enable extensions. > > Patches welcome, provided that they are based on reflection and do not > force me to update the servlet whenever a new property is introduced.
I agree. Currently support for enabledForExtensions is hard-coded into XmlRpcServlet.init. To my knowledge only contentLengthOptional is needed as well. Not sure entirely how you want reflection to be used. This is how I would do: 1. iterate over ServletConfig.getInitParameterNames 2. foreach init param name check if there is a corresponding setter method (setter can only have one argument) 3. convert init param value to the data type that the setters argument has In step 3) what data types should be supported? byte, short, int, long, float, double and String? What exception should be thrown (ServletException?) if no matching method can be found in step 2) or data type conversion fails in step 3)? >> However, I still need to subclass the XmlRpcServlet anyhow because I need >> to >> set AuthenticationHandler and RequestProcessorFactoryFactory. > > Not surprising. And one of the reasons, why I never assumed that the > XmlRpcServlet should be configured from within web.xml. My assumption > is, that one will need to dervive a subclass in most cases. But what's > the point? There won't be a need to subclass XmlRpcServer as often with the enhancement mentioned here (reflective handling of init params and setters for RequestProcessorFactoryFactory, AuthenticationHandler and TypeConverterFactory. > Nevertheless, patches are again welcome. :-) I can provide patches for the above when we have an agreement on the solution and if you can a) guarantee that you will accept patches and b) create a new snapshot for the Maven repo. Regards, Jimisola -- View this message in context: http://www.nabble.com/How-to-setup-and-configure-a-Servlet-solution-programmatically-tf2300489.html#a6406265 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]