What is the difference between Java Servlet & JSP?
Answer / vengat
Both use server-side Java to dynamically generate web
pages. The source code to a JSP looks like HTML, with Java
embedded inside funny tags (*); the source code to a
servlet looks like Java, with HTML embedded in out.print
(...) statements. Both use the Servlet API to communicate
with the web server and the client. In fact, a JSP gets
compiled into a servlet, so they're almost identical in
terms of expressive power. The choice is, whether you're
more comfortable coding your pages in Java or in JSP-style
HTML
Though the both are identical, they have different roles in
the Model View Controller (MVC) architecture. View
corresponds to JSP, Controller corresponds to Servlet and
Model to BusinessLogic + Database
| Is This Answer Correct ? | 7 Yes | 0 No |
How do I prevent the output of my jsp or servlet pages from being cached by the browser?
Which language is used to write servlets and jsp?
Why session is used?
Which two interfaces does the javax servlet jsp package have?
How can we disable java code or scripting in jsp page?
How to forward a request to another source?
What is the difference between a jspwriter and a servlet printwriter?
What is the jsp:setproperty action?
what is the enitre process of using smart forms to create forms?
How can we stop errors on display in a jsp page?
What is jsp container?
How many messaging models do jms provide for and what are they?