>instead of generating HTML from code
At the relative bottom (Servelet API level) it works that way, servlets have a direct access to input/output stream, and they have to write plain byte[] (or string via Writer).
As for java syntax, it's not great for string manipulation, encoding (you will need some functions for all the html/javascript escaping).
If you see url's containing ".do" extensions - that was the standard for calling servlets w/o anything, it has changed, of course.