This commit is contained in:
地平线
2015-10-21 09:31:00 +08:00
parent 1321940819
commit 37716afc45

View File

@@ -23,8 +23,12 @@ public abstract class BasedHttpServlet extends HttpServlet {
private Map.Entry<String, Entry>[] actions;
public void preExecute(HttpRequest request, HttpResponse response) throws IOException {
}
@Override
public final void execute(HttpRequest request, HttpResponse response) throws IOException {
preExecute(request, response);
for (Map.Entry<String, Entry> en : actions) {
if (request.getRequestURI().startsWith(en.getKey())) {
Entry entry = en.getValue();