I found a NPE in your implementation of the PathInfoMapper command.
The exception is thrown when the PathInfoMapper tries to invoke the command he received from the request's pathInfo. This happens at following code:
// Map to the Command specified by the extra path info
Catalog catalog = (Catalog) context.get(getCatalogKey());
Command command = catalog.getCommand(pathInfo);
As you can see, the command tries to obtain the catalog using the "get" method from the context. The 'catalogKey' is defined to be the same as the one used by the ChainProcessor servlet:
private String catalogKey = ChainProcessor.CATALOG_DEFAULT;
The problem is that the catalog instance is set in the request scope, not inside the context instance. This is the piece of code from ChainProcessor that does that:
if (attribute == null) {
request.setAttribute(CATALOG_DEFAULT, theCatalog);
}
So, the PathInfoMapper always obtains a null reference from the command's context when it tries to obtain a catalog instance.
CHAIN-4- PathInfoMapper (and RequestParamterMapper / ServletInfoMapper) now inherit from LookupCommand - which provides the ability to specify a "catalogName" attribute:http://svn.apache.org/viewvc?view=rev&revision=532951
Also added an example webapp for the three mapper commands (
CHAIN-36):http://svn.apache.org/viewvc/jakarta/commons/proper/chain/trunk/apps/example/