This commit is contained in:
@@ -23,12 +23,13 @@ public abstract class BasedHttpServlet extends HttpServlet {
|
|||||||
|
|
||||||
private Map.Entry<String, Entry>[] actions;
|
private Map.Entry<String, Entry>[] actions;
|
||||||
|
|
||||||
public void preExecute(HttpRequest request, HttpResponse response) throws IOException {
|
public boolean preExecute(HttpRequest request, HttpResponse response) throws IOException {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void execute(HttpRequest request, HttpResponse response) throws IOException {
|
public final void execute(HttpRequest request, HttpResponse response) throws IOException {
|
||||||
preExecute(request, response);
|
if (!preExecute(request, response)) return;
|
||||||
for (Map.Entry<String, Entry> en : actions) {
|
for (Map.Entry<String, Entry> en : actions) {
|
||||||
if (request.getRequestURI().startsWith(en.getKey())) {
|
if (request.getRequestURI().startsWith(en.getKey())) {
|
||||||
Entry entry = en.getValue();
|
Entry entry = en.getValue();
|
||||||
|
|||||||
Reference in New Issue
Block a user