Can you pound a nail with a wrench? Yes, although it's certainly more difficult than doing it with a hammer. Can you turn a bolt with a hammer? Well, yes, I suppose, if you hit it at an angle; but a wrench works far better.
The point being that, although ultimately you can write
anything in assembly language, in general it's best to use a language or tool that sets up an abstraction that's not far from what you need to accomplish. If you need to write
Java code to compute something in response to a Web request, then writing a Servlet is quite convenient. If you need to display a bunch of HTML and include a value or two from Java, then a JSP is a far better choice. Could you use Servlets in both cases? Yes, but it would be harder. Could you use a JSP in both cases? Yes, but again, it would be harder.
Choosing the proper tool for the proper job makes life easier and more pleasant, and you get more done with less effort. Do you really not understand this, or do you just enjoy arguing?