com.caucho.rewrite
Class SendError

java.lang.Object
  extended by com.caucho.rewrite.AbstractDispatchRule
      extended by com.caucho.rewrite.AbstractRegexpDispatchRule
          extended by com.caucho.rewrite.AbstractTargetDispatchRule
              extended by com.caucho.rewrite.SendError
All Implemented Interfaces:
DispatchRule

@Configurable
public class SendError
extends AbstractTargetDispatchRule

Sends a HTTP error response using response.sendError(code)

 <web-app xmlns:resin="urn:java:com.caucho.resin">

   <resin:SendError regexp="^/hidden" code="512"/>

 </web-app>
 


Constructor Summary
SendError()
           
 
Method Summary
 FilterChain createDispatch(DispatcherType type, java.lang.String uri, java.lang.String queryString, java.lang.String target, FilterChain next)
           
 void setCode(int code)
          Sets the HTTP error code
 void setMessage(java.lang.String message)
          Sets the HTTP error message
 
Methods inherited from class com.caucho.rewrite.AbstractTargetDispatchRule
getTarget, init, rewriteDefault, rewriteTarget, setAbsoluteTarget, setTarget, setTargetHost
 
Methods inherited from class com.caucho.rewrite.AbstractRegexpDispatchRule
add, add, add, getRegexp, isFilter, isForward, isInclude, isRequest, map, rewriteUri, setRegexp, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SendError

public SendError()
Method Detail

setCode

public void setCode(int code)
Sets the HTTP error code


setMessage

public void setMessage(java.lang.String message)
Sets the HTTP error message


createDispatch

public FilterChain createDispatch(DispatcherType type,
                                  java.lang.String uri,
                                  java.lang.String queryString,
                                  java.lang.String target,
                                  FilterChain next)
Overrides:
createDispatch in class AbstractRegexpDispatchRule