Sharad makes a good point. One very common, and good,
pattern is to let the servlet perform all the
Java processing, place whatever data is relevant onto the request as scoped variables, and then forward to a JSP page to render the view.
This takes advantage of the best of both worlds: Java processing is best performed in Java classes (rather than in a JSP), and HTML generation is much easier within a JSP.