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
Is java se free?
What is a generic code?
Can static method access instance variables ?
Differentiate between nested and inner class in java.
What steps are taken when the OS shifts from one-thread execution to another?
How do you remove spaces in java?
Why do we need data structure in java?
Are arrays primitive data types?
What is the size of arraylist in java?
What is the difference between processes and threads?
What is the byte order of byte buffer?
Difference between a class and an object?
Does google use java?
Can you have two constructors in java?
What is double parsedouble in java?