Question: why jsp is preferred over servlet?
Answer: 1 Answer. The main advantage of JSP is that it's are easier to code and to read when you are creating a dynamic HTML front-end. ... In a servlet you would have to invert the logic, ie, write java code and print HTML. That's because in the presentation layer most code is HTML/JS.