protected ModelAndView handleContext(String contextName, Context context, HttpServletRequest request,
HttpServletResponse response) throws Exception {
HttpSession session = request.getSession();
Summary summary = session != null ? (Summary) session.getAttribute(DisplayJspController.SUMMARY_ATTRIBUTE) : null;
if (request.getMethod().equalsIgnoreCase("post") && summary != null ) {
List names = new ArrayList();
for (Enumeration e = request.getParameterNames(); e.hasMoreElements(); ) {
String name = (String) e.nextElement();
if ("on".equals(request.getParameter(name))) {
names.add(name);
}
}
getContainerWrapper().getTomcatContainer().recompileJsps(context, summary, names);
session.setAttribute(DisplayJspController.SUMMARY_ATTRIBUTE, summary);
} else if ( summary != null && contextName.equals(summary.getName())) {
String name = ServletRequestUtils.getStringParameter(request, "source", null);
if (name != null) {
List names = new ArrayList();
names.add(name);
getContainerWrapper().getTomcatContainer().recompileJsps(context, summary, names);