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

Can an interface extend a class?

536


Can we sort set in java?

531


What is an example of a conditional statement?

560


how to deploy apache tomcat server to weblogic server in java

1591


what is the difference between a threads start() and run() methods? : Java thread

518






What is the difference between applet and application?

540


What is structure of java heap? What is perm gen space in heap?

536


What does provide mean construction?

550


What is complexity and its types?

520


what is the swingutilities.invokelater(runnable) method for? : Java thread

539


What is variable in java?

516


What is tostring () method?

534


What is independent and dependent variables in research?

465


Are arrays immutable in java?

536


What is a numeric digit?

579