You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by "Jochen Wiedmann (JIRA)" <xm...@ws.apache.org> on 2006/05/24 21:01:33 UTC

[jira] Closed: (XMLRPC-84) enableForExtension Servlet parameter ignored

     [ http://issues.apache.org/jira/browse/XMLRPC-84?page=all ]
     
Jochen Wiedmann closed XMLRPC-84:
---------------------------------

    Resolution: Fixed

I don't know what makes you believe, that the XmlRpcServlet was supposed to accept such an init parameter. Nevertheless, I like the idea and have thus added your patch as an enhancement.

P.S: When filing a bug report the next time, please use a sensible value for priority. This is definitely *not* critical.


> enableForExtension Servlet parameter ignored
> --------------------------------------------
>
>          Key: XMLRPC-84
>          URL: http://issues.apache.org/jira/browse/XMLRPC-84
>      Project: XML-RPC
>         Type: Bug

>   Components: Source
>     Versions: 3.0a1
>  Environment: Tomcat 5.5.17, Windows XP SP2, Java 1.5.0_06
>     Reporter: Denis Carniel
>     Priority: Critical

>
> When using the "enabledForExtensions" parameter for the XmlRpcServlet, the parameter seems to be ignored, and all requests involving extensions report an error.
> By changing the Servlet "init" method as follow, the behaviour is as expected (i.e. if value is set to true, extensions can used):
> 	public void init(ServletConfig pConfig) throws ServletException {
> 		super.init(pConfig);
> 		try {
> 			server = newXmlRpcServer(pConfig);
> 			server.setHandlerMapping(newXmlRpcHandlerMapping());
> 			String enabledForExtensionsParam = pConfig.getInitParameter("enabledForExtensions");
> 			if( ( enabledForExtensionsParam != null ) && ( enabledForExtensionsParam.equals( "true" ) ) ) {
> 				( (XmlRpcServerConfigImpl)server.getConfig() ).setEnabledForExtensions( true );
> 			} else {
> 				( (XmlRpcServerConfigImpl)server.getConfig() ).setEnabledForExtensions( false );
> 			}
> 		} catch (XmlRpcException e) {
> 			try {
> 				log("Failed to create XmlRpcServer: " + e.getMessage(), e);
> 			} catch (Throwable ignore) {
> 			}
> 			throw new ServletException(e);
> 		}
> 	}
> It only consists in looking up the ServletConfig for the parameter. As I couldn't find any other reference to it in the code, I guess this is a bug. Though not being very familiar with this project I might have overlooked something.
> Regards,
> Denis Carniel

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org