// init and store session tools map
stmap = new HashMap(sessionToolInfo.size());
Iterator i = sessionToolInfo.iterator();
while(i.hasNext())
{
ToolInfo ti = (ToolInfo)i.next();
stmap.put(ti.getKey(), ti.getInstance(ctx));
}
session.setAttribute(SESSION_TOOLS_KEY, stmap);
}
// add them to the toolbox
toolbox.putAll(stmap);
}
}
}
//add and initialize request tools
Iterator i = requestToolInfo.iterator();
while(i.hasNext())
{
ToolInfo info = (ToolInfo)i.next();
toolbox.put(info.getKey(), info.getInstance(ctx));
}
return new ToolboxContext(toolbox);
}