Examples of ModelAndView


Examples of org.springframework.web.servlet.ModelAndView

        }
*/

        tomcatTestReport.setMaxServiceTime(maxServiceTime);

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

Examples of org.springframework.web.servlet.ModelAndView

                reverseName = InetAddress.getByName(theIP).getCanonicalHostName();
            } catch (UnknownHostException e) {
                logger.error("could not run a DNS query on "+theIP);
            }
        }
        return new ModelAndView(getViewName(), "result", lines).
                addObject("timeout", Boolean.valueOf(timeout)).
                addObject("whoisServer", wh != null ? wh.getServer() + ":"+ wh.getPort() : defaultServer + ":" + defaultPort).
                addObject("domainName", reverseName);
    }
View Full Code Here

Examples of org.springframework.web.servlet.ModelAndView

    }

    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
        String originalURI = (String) request.getAttribute("javax.servlet.error.request_uri");
        if (originalURI != null && originalURI.endsWith(ajaxExtension)) {
            return new ModelAndView(ajaxViewName);
        } else {
            return new ModelAndView(viewName);
        }
    }
View Full Code Here

Examples of org.springframework.web.servlet.ModelAndView

            if (contextName != null) {
                request.setAttribute("errorMessage",
                        getMessageSourceAccessor().getMessage("probe.src.contextDoesntExist", new Object[] {contextName}));
            }

            return new ModelAndView("errors/paramerror");
        }
    }
View Full Code Here

Examples of org.springframework.web.servlet.ModelAndView

        } else {
            Runtime.getRuntime().gc();
            logger.debug("Advised Garbage Collection");
        }
        logger.debug("Redirected to "+redirectURL);
        return new ModelAndView(new RedirectView(redirectURL));
    }
View Full Code Here

Examples of org.springframework.web.servlet.ModelAndView

    public void setCollectionPeriod(long collectionPeriod) {
        this.collectionPeriod = collectionPeriod;
    }

    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
        return new ModelAndView(getViewName())
                .addObject("pools", getJvmMemoryInfoAccessorBean().getPools())
                .addObject("collectionPeriod", new Long(getCollectionPeriod()));
    }
View Full Code Here

Examples of org.springframework.web.servlet.ModelAndView

        String path = request.getServletPath();
        String internalPath = path.replaceAll(xmlMarker, "");

        Controller controller = (Controller) getApplicationContext().getBean(internalPath);
        if (controller != null) {
                ModelAndView modelAndView = controller.handleRequest(request, response);
                if (modelAndView.getModel() != null) {
                    TransportableModel tm = new TransportableModel();
                    tm.putAll(modelAndView.getModel());
                    XStream x = new XStream();
                    x.toXML(tm, response.getWriter());
                }
        }
        return null;
View Full Code Here

Examples of org.springframework.web.servlet.ModelAndView

        boolean supportsGlobal = getContainerWrapper().getResourceResolver().supportsGlobalResources();
        boolean supportsPrivate = getContainerWrapper().getResourceResolver().supportsPrivateResources();
        boolean supportsDSLookup = getContainerWrapper().getResourceResolver().supportsDataSourceLookup();
        List privateResources = getContainerWrapper().getPrivateDataSources();
        List globalResources = getContainerWrapper().getGlobalDataSources();
        return new ModelAndView(getViewName())
                .addObject("supportsGlobal", Boolean.valueOf(supportsGlobal))
                .addObject("supportsPrivate", Boolean.valueOf(supportsPrivate))
                .addObject("supportsDSLookup", Boolean.valueOf(supportsDSLookup))
                .addObject("privateResources", privateResources)
                .addObject("globalResources", globalResources);
View Full Code Here

Examples of org.springframework.web.servlet.ModelAndView

* @author Vlad Ilyushchenko
*/
public class ListApplicationResourcesController extends ContextHandlerController {

    protected ModelAndView handleContext(String contextName, Context context, HttpServletRequest request, HttpServletResponse response) throws Exception {
        return new ModelAndView(getViewName(), "resources", getContainerWrapper().getResourceResolver().getApplicationResources(context));
    }
View Full Code Here

Examples of org.springframework.web.servlet.ModelAndView

                if (e instanceof ThreadDeath) {
                    throw (ThreadDeath) e;
                }
            }
        }
        return new ModelAndView(getViewName(), "available",
                Boolean.valueOf(context != null && context.getAvailable()));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.