}
private void handle(int sub, String[] pathInfo, String mime, HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
{
Controller c = _controllers.get(pathInfo[sub]);
if(c==null)
{
log.warn("No controller matched on: " + pathInfo[sub]);
response.sendError(404);
return;
}
if(sub+1==pathInfo.length)
{
RESTControllerContext.handle(c, mime, request, response);
return;
}
String verbOrIdAttr = c.getIdentifierAttribute();
if(verbOrIdAttr==null)
{
log.warn(pathInfo[sub+1] + " is not a verb nor an id of " + pathInfo[sub]);
response.sendError(404);
return;