}
protected void backflush() {
+ resp.setStatus(respcode);
for(String key : outheaders().keySet()) {
boolean first = true;
for(String val : outheaders().values(key)) {
public class Bootstrap {
public static Responder responder() {
- return(new ErrorHandler(new TestResponder()));
+ return(new ErrorHandler(new Rehandler(new TestResponder())));
}
}
package dolda.jsvc.test;
import dolda.jsvc.*;
+import dolda.jsvc.util.*;
import java.io.*;
public class TestResponder implements Responder {
out.println("</html>");
if(req.path().equals("bard2"))
- throw(new RuntimeException("bard2"));
+ throw(Restarts.redirectctx("/slen"));
out.flush();
}
}
public abstract class ResponseBuffer implements ResettableRequest {
private boolean flushed = false;
- private int respcode = -1;
- private String resptext = null;
+ protected int respcode = -1;
+ protected String resptext = null;
private OutputStream out = null, wrapout = null;
private MultiMap<String, String> headers;