Answer Posted / 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 |
Post New Answer View All Answers
Why use of scripting elements in jsp is discouraged?
What is jsp container?
What is directive jsp?
What are the different types of directives available in jsp?
What is the use of jstl?
How to pass information from jsp to included jsp?
Differentiate between jsp scriptlet tag and declaration tag.
When destroy method of jsp is called?
Why do we use jsp?
What are the elements of jsp?
What is jsp and its features?
What are the two types of comments supported by jsp?
Why do we need custom tags?
Why is _jspservice () method starting with an '_'?
What are custom tags in jsp?