rewrite-config-servlet 2.0.0.Beta3

org.ocpsoft.rewrite.servlet.config
Class Forward

java.lang.Object
  extended by org.ocpsoft.rewrite.config.DefaultOperationBuilder
      extended by org.ocpsoft.rewrite.servlet.config.HttpOperation
          extended by org.ocpsoft.rewrite.servlet.config.Forward
All Implemented Interfaces:
Operation, OperationBuilder, Parameterized

public class Forward
extends HttpOperation
implements Parameterized

An Operation that forwards an inbound request to a configured internal resource Address via InboundServletRewrite.forward(String)

Author:
Lincoln Baxter, III

Method Summary
 Set<String> getRequiredParameterNames()
           
 ParameterizedPatternBuilder getTargetExpression()
           
 void performHttp(HttpServletRewrite event, EvaluationContext context)
           
 void setParameterStore(ParameterStore store)
           
static Forward to(String location)
          Create a new Operation that forwards the current request to the given location within the servlet container.
 String toString()
           
 
Methods inherited from class org.ocpsoft.rewrite.servlet.config.HttpOperation
perform
 
Methods inherited from class org.ocpsoft.rewrite.config.DefaultOperationBuilder
and
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

to

public static Forward to(String location)
Create a new Operation that forwards the current request to the given location within the servlet container. This does not change the browser Address, all processing is handled within the current HttpServletRequest.

The given location may be parameterized:

/example/{param}.html
/example/{value}/sub/{value2}
...

Parameters:
location - ParameterizedPattern specifying the Address of the internal resource.
See Also:
ConfigurationRuleParameterBuilder#where(String)} {@link HttpServletRequest#getRequestDispatcher(String)} {@link RequestDispatcher#forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)}

performHttp

public void performHttp(HttpServletRewrite event,
                        EvaluationContext context)
Specified by:
performHttp in class HttpOperation

toString

public String toString()
Overrides:
toString in class Object

getTargetExpression

public ParameterizedPatternBuilder getTargetExpression()

getRequiredParameterNames

public Set<String> getRequiredParameterNames()
Specified by:
getRequiredParameterNames in interface Parameterized

setParameterStore

public void setParameterStore(ParameterStore store)
Specified by:
setParameterStore in interface Parameterized

rewrite-config-servlet 2.0.0.Beta3

Copyright © 2013 OCPsoft. All Rights Reserved.