Examples of JstlView


Examples of org.springframework.web.servlet.view.JstlView

   * Uses supplied view
   */
  @SpringView()
  public ModelAndView getResult()
  {
    JstlView view = new JstlView();
    view.setUrl("/message.jsp");
    return new ModelAndView(view);
  }
View Full Code Here

Examples of org.springframework.web.servlet.view.JstlView

  // internal helpers

  private View getViewInternal(String viewPath, RequestContext context, ApplicationContext flowContext) {
    if (viewPath.endsWith(".jsp") || viewPath.endsWith(".jspx")) {
      if (JSTL_PRESENT) {
        JstlView view = new JstlView(viewPath);
        view.setApplicationContext(flowContext);
        return view;
      } else {
        InternalResourceView view = new InternalResourceView(viewPath);
        view.setApplicationContext(flowContext);
        return view;
      }
    } else {
      throw new IllegalArgumentException("Unsupported view type " + viewPath
          + " only types supported by this FlowViewResolver implementation are [.jsp] and [.jspx]");
View Full Code Here

Examples of org.springframework.web.servlet.view.JstlView

        ExampleViewResolver() {
            super();
        }

        public View resolveViewName(String viewName, Locale locale) throws Exception {
            return new JstlView("testUrl");
        }
View Full Code Here

Examples of org.springframework.web.servlet.view.JstlView

        super();
    }

    @Test
    public void viewRenderMonitored() throws Exception {
        JstlView testUrlBasedView = new JstlView("myjsp.jsp");

        testUrlBasedView.setServletContext(new MockServletContext());
        MockHttpServletRequest request = new MockHttpServletRequest();
        request.setAttribute(RequestContext.WEB_APPLICATION_CONTEXT_ATTRIBUTE,
                new GenericWebApplicationContext());
        Map<String, Object> model = new HashMap<String, Object>();
        testUrlBasedView.render(model,
                request,
                new MockHttpServletResponse());

        Operation operation = getLastEntered();
        assertEquals("Render view \"myjsp.jsp\"", operation.getLabel());
View Full Code Here

Examples of org.springframework.web.servlet.view.JstlView

  // internal helpers

  private View getViewInternal(String viewPath, RequestContext context, ApplicationContext flowContext) {
    if (viewPath.endsWith(".jsp") || viewPath.endsWith(".jspx")) {
      if (JSTL_PRESENT) {
        JstlView view = new JstlView(viewPath);
        view.setApplicationContext(flowContext);
        return view;
      } else {
        InternalResourceView view = new InternalResourceView(viewPath);
        view.setApplicationContext(flowContext);
        return view;
      }
    } else {
      throw new IllegalArgumentException("Unsupported view type " + viewPath
          + " only types supported by this FlowViewResolver implementation are [.jsp] and [.jspx]");
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.