Hi there, sorry but I do not have the actual code with me, but I will try to explain:
I have a servlet mapped to the following:
/admin/*
So, this goes to a servlet:
public class AdminController extends MainController {
public void doPost(HttpServletRequest request, HttpServletResponse response) {
// Do stuf here
}
}
Here is MainController:
public class MainController extends HttpServlet {
@Override
public void service(ServletRequest request, ServletResponse response) {
String requesturi = ((HttpServletRequest)request).getRequestURI();
reqlist = Arrays.asList(requesturi.substring(requesturi.indexOf(Util.rootPath) + Util.rootPath.length()).split("/"));
reqlist = reqlist.subList(1, reqlist.size());
doPost((HttpServletRequest)request, (HttpServletResponse)response);
}
So, the request is passed to AdminController, no problem, but then I reallized something:
The servlet is being called twice!. And this is causing me many errors..
Does anybody have a clue on this? It is because I used some kind of heritance? Thank you for all!