Looks like you're confused in the usual way for beginners. You're confused between the code which sends the request and the code which processes the request. (I found that hard to keep straight when I started web programming too.) That JSP you posted doesn't need to be a JSP (like Sai Hegde said). It just needs to be an HTML which sends the request to the servlet.
The HTML part of what you have there looks okay to me. The JSP part, where you declared that the JSP produces a JPEG:
That's the confused part. That JSP doesn't produce an image at all. It produces some HTML which
contains an image. It happens that the image that it contains is returned by a servlet, but the HTML doesn't care about that. So when you're
testing this, just write a simple piece of HTML which includes the <img> element.