What is the difference between Java Servlet & JSP?



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

Post New Answer

More JSP Interview Questions

What is scriptlet and what is expression?

0 Answers  


How do you comment out in jsp?

0 Answers  


List the different scope values for the <jsp:usebean> tag in jsp?

0 Answers  


How can I use jsp in the mvc model?

0 Answers  


What are the attributes of page directive?

0 Answers  






Can you make use of a servletoutputstream object from within a jsp page?

0 Answers  


What is a output comment?

0 Answers  


Is jsp platform dependent?

0 Answers  


What is taglibs?

0 Answers  


how the jsp file is compiled?

4 Answers   College School Exams Tests, Persistent,


Explain the difference between include directive and include action in jsp?

0 Answers  


Explain static method?

0 Answers  


Categories