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

Can we define a class in a jsp page?

0 Answers  


What is an expression language?

0 Answers  


What are the different scope values for the jsp objects?

0 Answers  


What is the purpose of jsp and why it is widely used?

0 Answers  


What is jsp page?

0 Answers  






What is client side technology?

0 Answers  


what is the difference between jsp and servlets ?

0 Answers   Cap Gemini,


What is jsp translation phase?

0 Answers  


What is jstl jar?

0 Answers  


Why are implicit objects not available in a regular jsp page?

0 Answers  


Which jsp methods can be overridden?

0 Answers  


Give a sample jsp configuration in the deployment descriptor.

0 Answers  


Categories