Package org.mojavemvc.views

Examples of org.mojavemvc.views.JSP


public class TestJSPView {

    @Test
    public void testJspView_getJSPName() throws Exception {

        JSP view = new JSP("test.jsp");
        assertEquals("test.jsp", view.getJSPName());
    }
View Full Code Here


    }

    @Test
    public void testJspView_getJSPName_noSuffix() throws Exception {

        JSP view = new JSP("test");
        assertEquals("test.jsp", view.getJSPName());
    }
View Full Code Here

        ErrorHandler errorHandler = new DefaultJSPErrorHandler();
        View view = errorHandler.handleError(null, properties);

        assertTrue(view instanceof JSP);
        JSP jspView = (JSP) view;
        assertEquals(errorJsp, jspView.getJSPName());
    }
View Full Code Here

public class JSPController {

    @Action("basic/:val")
    public View basic(@Param("val") String val) {
       
        return new JSP("basic").withAttribute("val", val);
    }
View Full Code Here

    public static final String JSP_ERROR_FILE = "mojavemvc-internal-jsp-error-file";

    public View handleError(Throwable e, AppProperties properties) {

        String errorFile = (String)properties.getProperty(JSP_ERROR_FILE);
        return new JSP(errorFile);
    }
View Full Code Here

TOP

Related Classes of org.mojavemvc.views.JSP

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.