When I called one servlet from another inside single if statement I was shocked, that even if my forwarding method was called the flow didnt stopped and next methods were invoked (I had to put them into else statement to stop this).
How come? Does this mean that forward is asynchronous (if so, are there any more such a “tricky” methods)?
I’ve used “standard” forwarding: request.getRequestDispatcher(JSPFileName).forward(request, response);
No, it doesn’t mean it’s asynchronous. It just means that forward is a regular Java method, and that there’s no reason for the rest of the code not to execute. It’s just of your responsibility to avoid modifying the response after the request has been forwarded. But why wouldn’t the following code log everything to the standard output?