You aren't going to do it from the console, that's for sure.
Officially, System.out and System.err don't even exist in a
J2EE application environment. If you print to them, there's absolutely no guarantee as to where the output will show up. Or even if it will show up at all.
To output text to a web page, you have to obtain an HttpOutputStream from the HttpServletResponse object and write the output there. But from the sound of it, you need to study how servlets work, first.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.