Re: 404 rewrite handler for images

Splash Forums Rewrite Users 404 rewrite handler for images Re: 404 rewrite handler for images



Thanks Christian.

Pretty much what I ended up with some additional filtering based in on the request path.

I’ve been trying to set a EvaluationContext variable in condition and use in the perform step something like

.when(new HttpCondition() {
public boolean evaluateHttp(HttpServletRewrite event, EvaluationContext context) {
if (Direction.isInbound().evaluate(event, context)) {
String path = event.getRequestPath();
if(path.contains(".jpg")) {
InputStream stream = event.getRequest().getServletContext().getResourceAsStream(path);
if (stream == null) {
return true;
return false;

but I get java.lang.IllegalArgumentException: Attempted to access the non-existent EvaluationContext property “{text}”

I’m not sure if I can access this variable in this way