public String prepareExpectedRoutingMessage(String requestPath) { // for debug final StringBuilder sb = new StringBuilder(); sb.append("\n"); sb.append("/= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = *No routing action:\n"); sb.append("e.g. expected actions for ").append(requestPath).append("\n"); final MappingPathResource pathResource = customizeActionMapping(requestPath); final List<String> nameList = buildExpectedRoutingActionList(pathResource.getMappingPath()); boolean exists = false; for (String name : nameList) { if (name.endsWith("@index()") && containsNotAllowedCharacterAsActionPath(requestPath)) { // e.g. /product/List/ continue; } final String packageExp = Srl.substringLastFront(name, "."); if (!containsNotAllowedCharacterAsActionPath(packageExp)) { sb.append(" web.").append(name).append("\n"); exists = true; } } if (exists) { sb.append(" (and so on...)\n"); } else { sb.append(" *no suggestion... e.g. cannot use upper case in action path\n"); } sb.append("= = = = = = = = = =/"); return sb.toString(); }
public String prepareExpectedRoutingMessage(String requestPath) { // for debug final StringBuilder sb = new StringBuilder(); sb.append("\n"); sb.append("/= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = *No routing action:\n"); sb.append("e.g. expected actions for ").append(requestPath).append("\n"); final MappingPathResource pathResource = customizeActionMapping(requestPath); final List<String> nameList = buildExpectedRoutingActionList(pathResource.getMappingPath()); boolean exists = false; for (String name : nameList) { if (name.endsWith("@index()") && containsNotAllowedCharacterAsActionPath(requestPath)) { // e.g. /product/List/ continue; } final String packageExp = Srl.substringLastFront(name, "."); if (!containsNotAllowedCharacterAsActionPath(packageExp)) { sb.append(" web.").append(name).append("\n"); exists = true; } } if (exists) { sb.append(" (and so on...)\n"); } else { sb.append(" *no suggestion... e.g. cannot use upper case in action path\n"); } sb.append("= = = = = = = = = =/"); return sb.toString(); }