|
rewrite-impl-servlet 1.0.4.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ocpsoft.rewrite.config.DefaultOperationBuilder
org.ocpsoft.rewrite.servlet.config.HttpOperation
org.ocpsoft.rewrite.servlet.config.Redirect
public class Redirect
An Operation that performs redirects via HttpInboundServletRewrite.redirectPermanent(String) and
HttpInboundServletRewrite.redirectTemporary(String)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.ocpsoft.rewrite.servlet.config.IRedirect |
|---|
IRedirect.IRedirectParameter, IRedirect.RedirectParameter |
| Method Summary | |
|---|---|
ParameterizedPattern |
getTargetExpression()
|
void |
performHttp(HttpServletRewrite event,
EvaluationContext context)
|
static Redirect |
permanent(String location)
Issue a permanent redirect ( 301 HttpServletResponse.SC_MOVED_PERMANENTLY ) to the given location. |
static Redirect |
temporary(String location)
Issue a temporary redirect ( 302 HttpServletResponse.SC_MOVED_TEMPORARILY ) to the given location. |
IRedirect.RedirectParameter |
where(String param)
|
IRedirect.RedirectParameter |
where(String param,
Binding binding)
|
| Methods inherited from class org.ocpsoft.rewrite.servlet.config.HttpOperation |
|---|
perform |
| Methods inherited from class org.ocpsoft.rewrite.config.DefaultOperationBuilder |
|---|
and, create, wrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.ocpsoft.rewrite.config.OperationBuilder |
|---|
and |
| Methods inherited from interface org.ocpsoft.rewrite.config.Operation |
|---|
perform |
| Method Detail |
|---|
public void performHttp(HttpServletRewrite event,
EvaluationContext context)
performHttp in class HttpOperationpublic static Redirect permanent(String location)
HttpServletResponse.SC_MOVED_PERMANENTLY ) to the given location. If the
given location is not the same as HttpServletRewrite.getURL(), this will change the browser URL
and result in a new request. Note that in order to redirect within the ServletContext, you must prepend
the ServletContext.getContextPath() manually.
The given location may be parameterized using the following format:
/example/{param}
/example/{value}/sub/{value2}
... and so on
By default, matching parameter values are bound to the EvaluationContext.
See also where(String)
public static Redirect temporary(String location)
HttpServletResponse.SC_MOVED_TEMPORARILY ) to the given location. If the
given location is not the same as HttpServletRewrite.getURL(), this will change the browser URL
and result in a new request. Note that in order to redirect within the ServletContext, you must prepend
the ServletContext.getContextPath() manually.
The given location may be parameterized using the following format:
/example/{param}
/example/{value}/sub/{value2}
... and so on
By default, matching parameter values are bound to the EvaluationContext.
See also where(String)
public IRedirect.RedirectParameter where(String param)
where in interface Parameterized<IRedirect,IRedirect.RedirectParameter,String>
public IRedirect.RedirectParameter where(String param,
Binding binding)
where in interface Parameterized<IRedirect,IRedirect.RedirectParameter,String>public ParameterizedPattern getTargetExpression()
getTargetExpression in interface IRedirect
|
rewrite-impl-servlet 1.0.4.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||