Actually, I think it is meant to be this way. The textbook examples being followed start with a "bad" way of doing things, and then progressively shows you how to make things better, explaining why along the way.
So the first example (posted in another
thread) had everything in the servlet. This step is starting to pull the front end code out into a JSP.
Baby steps.
There is still definitely room for improvement in this class though.
A couple of points I think are relevant:
A servlet should either handle the output itself (writing to the response) OR forward via the request dispatcher. It should NEVER do both - suddenly you have two bits of code writing to the response, which probably leads to an Exception.
In general the structure should be something like:
Right now you are displaying your page, and THEN going and running actions (which might result in an error message)
As a generic coding suggestion, there looks to be a lot of repeated/redundant code. I would recommend refactoring it into a displayErrorMessage() method which then makes your code easier to read as it condenses the rest of your logic.