Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between Java Servlet & JSP?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are jsp pages the preferred api for creating a web-based client program?

1100


How to delete a cookie in jsp?

1037


What is difference between page and pagecontext in jsp?

910


How can I implement a thread-safe jsp page?

981


What language is used to write servlets and jsp?

912


How can we use beans in jsp?

1052


What is the difference between server side and client side programming?

986


How can automatic creation of session be prevented in a jsp page?

1001


Is there a way I can set the inactivity lease period on a per-session basis?

903


What is jsp expression language and what are it’s benefits?

1204


Is the session object always created on the jsp page, is it possible to disable its creation?

958


Can I declare a java class in jsp?

1057


What are the possible values for language directive?

951


What are the jsp lifecycle phases?

1040


What is called jsp directive?

995