whats the diff between jsp and servlets?

Answer Posted / rajashree

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; and since you can call a JSP from a Servlet and vice
versa, you don't have to make an either-or decision.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the main advantage of passing argument by reference?

507


Is object a data type in java?

597


Explain java coding standards for methods?

613


What are the skills required for core java?

544


What is difference between call by value and call by reference?

506






How can you generate random numbers in java?

592


What is the difference between JDK and JVM?

635


Why is java not 100% pure oops?

623


Explain about strings in java?

622


What is final, finally, finalize?

603


Can we override the private methods?

531


What is java util?

541


What is the lifetime and scope of a variable?

520


When do you call copy constructor?

561


What is meant by memory leak?

544