Package org.springframework.web.servlet

Examples of org.springframework.web.servlet.ModelAndView


                    threads.add(st);
                }
            }
        }
        return new ModelAndView(getViewName(), "threads", threads);
    }
View Full Code Here


            if (sessData != null) {
                queryHistory = sessData.getQueryHistory();
            }
        }

        return new ModelAndView(getViewName(), "queryHistory", queryHistory);
    }
View Full Code Here

*/
public class ListAppAttributesController extends ContextHandlerController {
    protected ModelAndView handleContext(String contextName, Context context,
                                         HttpServletRequest request, HttpServletResponse response) throws Exception {
        List appAttrs = ApplicationUtils.getApplicationAttributes(context);
        ModelAndView mv = new ModelAndView(getViewName(), "appAttributes", appAttrs);

        if (SecurityUtils.hasAttributeValueRole(getServletContext(), request)) {
            mv.addObject("displayValues", Boolean.TRUE);
        }
        return mv;
    }
View Full Code Here

                                         HttpServletRequest request, HttpServletResponse response) throws Exception {

        String attrName = ServletRequestUtils.getStringParameter(request, "attr");
        context.getServletContext().removeAttribute(attrName);

        return new ModelAndView(new RedirectView(request.getContextPath() + getViewName() + "?" + request.getQueryString()));
    }
View Full Code Here

            if (context.getLoader() != null && context.getLoader().getClassLoader() != null) {
                classLoaderMap.put(toUID(context.getLoader().getClassLoader()), context.getName());
            }
        }

        return new ModelAndView(getViewName(), "threads", enumerateThreads(classLoaderMap));
    }
View Full Code Here

            executeAction(contextName);
        } catch (Exception e) {
            request.setAttribute("errorMessage", e.getMessage());
            logger.error(e);
            return new ModelAndView(new InternalResourceView(getViewName()));
        }
        return new ModelAndView(new RedirectView(request.getContextPath() + getViewName() + (isPassQueryString() ? "?" + request.getQueryString() : "")));
    }
View Full Code Here

            backURL = referer.replaceAll(replacePattern, "");
        } else {
            backURL = null;
        }

        return new ModelAndView(getViewName())
                .addObject("maxRows", String.valueOf(sessData == null ? getMaxRows() : sessData.getMaxRows()))
                .addObject("rowsPerPage", String.valueOf(sessData == null ? getRowsPerPage() : sessData.getRowsPerPage()))
                .addObject("historySize", String.valueOf(sessData == null ? getHistorySize() : sessData.getHistorySize()))
                .addObject("backURL", backURL)
                .addObject("collectionPeriod", new Long(getCollectionPeriod()));
View Full Code Here

    protected ModelAndView handleRequestInternal(HttpServletRequest request,
                                                 HttpServletResponse response) throws Exception {
        boolean forceOld = ServletRequestUtils.getBooleanParameter(request, "forceold", false);
        if (!forceOld && Utils.isThreadingEnabled()) {
            return new ModelAndView(impl2Controller);
        } else {
            return new ModelAndView(impl1Controller);
        }
    }
View Full Code Here

* @author Andy Shapoval
*/
public class ListAppInitParamsController  extends ContextHandlerController {
    protected ModelAndView handleContext(String contextName, Context context,
                                         HttpServletRequest request, HttpServletResponse response) throws Exception {
        ModelAndView mv = new ModelAndView(getViewName(), "appInitParams", ApplicationUtils.getApplicationInitParams(context));
        if (SecurityUtils.hasAttributeValueRole(getServletContext(), request)) {
            mv.addObject("allowedToViewValues", Boolean.TRUE);
        }

        return mv;
    }
View Full Code Here

                    logger.error("There was an exception querying classloader for thread \"" + threadName + "\"", e);
                }
            }
        }

        return new ModelAndView(getViewName());
    }
View Full Code Here

TOP

Related Classes of org.springframework.web.servlet.ModelAndView

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.