%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui" %>
/** * @jpf:action * @jpf:forward name="index" path="index.jsp" */ protected Forward begin() { return new Forward( "index" ); }
/** * @jpf:action * @jpf:forward name="indexRedirect" path="index.jsp" redirect="true" */ protected Forward redirect() { return new Forward( "indexRedirect" ); }
/** * @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; }
/** * @jpf:action */ protected Forward randomURI() throws Exception { return new Forward( new URI( "http://www.google.com/search?q=xmlbeans" ) ); }
/** * @jpf:action */ protected Forward uriRedirect() throws Exception { return new Forward( new URI( "/netui/index.jsp", true ) ); }
/** * @jpf:action */ protected Forward uriWebappForward() throws Exception { return new Forward( new URI( "/forwardTest/Controller.jpf" ) ); }
/** * @jpf:action */ protected Forward uriRelativeForward() throws Exception { return new Forward( new URI( "Controller.jpf" ) ); }
/** * @jpf:action */ protected Forward uriRelativeRedirect() throws Exception { return new Forward( new URI( "Controller.jpf" ), true ); }
/** * @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; }