private String[] parseDirectActionRequest(AWRequest request) { String actionName = DefaultActionName; String className = DefaultDirectActionClassName; AWApplication application = application(); Class directActionClass = null; String[] requestHandlerPathComponents = request.requestHandlerPath(); if (requestHandlerPathComponents != null) { AWNodeManager nodeManager = application.getNodeManager(); if (nodeManager != null) { requestHandlerPathComponents = nodeManager.filterUrlForNodeCallback(requestHandlerPathComponents); } int requestHandlerPathComponentsLength = requestHandlerPathComponents.length; if (requestHandlerPathComponentsLength > 0) { actionName = requestHandlerPathComponents[0]; } // Hack -- check explicitly for awres so we can use // path rather than query string -- for webserver caching of resources -- // example: http://host/ACM/Main/ad/awres/realm/imagename.jpg // if we can modify the webserver cache to understand query strings // then we can switch to // http://host/ACM/Main/ad/awimg?realm=xxxx&filename=xxxx if (requestHandlerPathComponentsLength > 1 && !AWDirectAction.AWResActionName.equals(actionName)) { className = application.directActionClassNameForKey(requestHandlerPathComponents[1]); // try to find a class for the className if (StringUtil.nullOrEmptyOrBlankString(className)) { className = DefaultDirectActionClassName; } else { directActionClass = AWUtil.classForName(className); if (directActionClass == null) { directActionClass = application.resourceManager().classForName(className); if (directActionClass == null) { className = DefaultDirectActionClassName; } } } } } String[] directActionName = new String[2]; directActionName[ClassNameIndex] = className; directActionName[ActionNameIndex] = actionName; return directActionName; }