*/
private ApplicationType[] findAppropriateApplications(HttpServletRequest req, Map<String, String[][]> criteriasInGroupsAndCategories) {
ApplicationManager applicationManager = new ApplicationManager(req.getLocale(),session);
ApplicationType[] applications = applicationManager.getApplications();
float[] applicationWeights = new float[applications.length];
CategoryManager categoryManager = new CategoryManager(req.getLocale(),session);
CriteriaManager criteriaManager = new CriteriaManager(req.getLocale(),session);
Category[] categories = categoryManager.getSortedCategories();
try {
// evaluate user input for all categories (input pages)
for (Category category : categories) {
String categoryname = category.getCategoryname();
String[][] criteriasInCategory = criteriasInGroupsAndCategories.get(categoryname);
if (criteriasInCategory != null) { // input page "touched"
CriteriaGroup[] groups = categoryManager.getSortedGroups(category);
// evaluate user input within the groups of a category
for (int groupX = 0; groupX < groups.length; groupX++) {
CriteriaGroup group = groups[groupX];