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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]