java.lang.Object
org.mentawai.core.Redirect
- All Implemented Interfaces:
- Consequence
- public class Redirect
- extends java.lang.Object
- implements Consequence
A redirect web consequence.
A normal redirect web consequence has just a url.
A redirect may also have dynamic parameters and a dynamic url.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REDIRURL_PARAM
public static java.lang.String REDIRURL_PARAM
- The parameter's name in the output for the dynamic redirect
url
private java.lang.String url
appendOutput
private boolean appendOutput
dynamicUrl
private boolean dynamicUrl
Redirect
public Redirect(java.lang.String url)
- Creates a normal redirect for the given url
Redirect
public Redirect(java.lang.String url,
boolean appendOutput)
- Creates a redirect for the given url with dynamic parameters.
The dynamic paramers are obtained from the output values.
Redirect
public Redirect()
- Creates a redirect with a dynamic url.
The dynamic url is obtanined from the output values.
putSlash
private java.lang.String putSlash(java.lang.String url)
execute
public void execute(Action a,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws ConsequenceException
- Description copied from interface:
Consequence
- Executes this consequence.
A consequence must do something with your web application.
Here is where you define what the consequence does.
- Specified by:
execute in interface Consequence
redirect
public static void redirect(java.lang.String url,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws java.io.IOException
- Redirect your web application to an URL.