<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui" %> Index Page for <netui:content value="${pageFlow.URI}"/>

Index Page for


forward to this page
    /**
     * @jpf:action
     * @jpf:forward name="index" path="index.jsp"
     */
    protected Forward begin()
    {
        return new Forward( "index" );
    }

redirect to this page
    /**
     * @jpf:action
     * @jpf:forward name="indexRedirect" path="index.jsp" redirect="true"
     */
    protected Forward redirect()
    {
        return new Forward( "indexRedirect" );
    }

redirect to this page, with query params
    /**
     * @jpf:action
     * @jpf:forward name="indexRedirect" path="index.jsp" redirect="true"
     */
    protected Forward withQueryParams()
    {
        Forward fw = new Forward( "indexRedirect" );
        fw.addQueryParam( "foo" );
        fw.addQueryParam( "bar", "baz" );
        return fw;
    }

redirect to google
    /**
     * @jpf:action
     */
    protected Forward randomURI()
        throws Exception
    {
        return new Forward( new URI( "http://www.google.com/search?q=xmlbeans" ) );
    }

redirect to the netui webapp
    /**
     * @jpf:action
     */
    protected Forward uriRedirect()
        throws Exception
    {
        return new Forward( new URI( "/netui/index.jsp", true ) );
    }

forward to this page, using a webapp-relative URI
    /**
     * @jpf:action
     */
    protected Forward uriWebappForward()
        throws Exception
    {
        return new Forward( new URI( "/forwardTest/Controller.jpf" ) );
    }

forward to this page, using a relative URI
    /**
     * @jpf:action
     */
    protected Forward uriRelativeForward()
        throws Exception
    {
        return new Forward( new URI( "Controller.jpf" ) );
    }

redirect to this page, using a relative URI
    /**
     * @jpf:action
     */
    protected Forward uriRelativeRedirect()
        throws Exception
    {
        return new Forward( new URI( "Controller.jpf" ), true );
    }

forward to this page using Forward.setPath()
    /**
     * @jpf:action
     * @jpf:forward name="unused" path=""
     */
    protected Forward setPath()
        throws Exception
    {
        //
        // Note that setPath() works differently than the URI/URL constructors.
        // It acts just like setPath() on the base class -- sets a path that
        // eventually gets the current context path prepended, and respects the
        // redirect and context-sensitive flags.
        //
        Forward fwd = new Forward( "unused" );
        fwd.setPath( "/forwardTest/index.jsp" );
        fwd.setContextRelative( true );
        return fwd;
    }