Progress?  Custom handler below.

Now all that is needed is the magic to enable MyErrorPageHandler when jetty is started via mvn jetty:run

Any ideas? Pointers to a clear example out on the Web (which so far have eluded me)?

Thanks

--------------------------


package com.cisco.sep2;

import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.mortbay.jetty.Response;
import org.mortbay.jetty.servlet.ErrorPageErrorHandler;

public class MyErrorPageHandler extends ErrorPageErrorHandler{

    @Override
    public void handle(String target, HttpServletRequest req,
            HttpServletResponse resp, int dispatch) throws IOException {

        int status = ((Response)resp).getStatus();
        if (status >= 400 || status <= 599)
        {
            resp.setContentLength(0);
            return;
        }
    }
}







On 3/7/2012 1:47 AM, Paul Duffy wrote:
Not obvious from docs or mailer archive.

Much appreciate a pointer.

Cheers


_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to