Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSP and the fly likes Difference between Servlet and JSP Interview question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Difference between Servlet and JSP Interview question" Watch "Difference between Servlet and JSP Interview question" New topic
Author

Difference between Servlet and JSP Interview question

Sandeep Awasthi
Ranch Hand

Joined: Oct 23, 2003
Posts: 597
What is difference between Servlet and JSP, can I use JSP where ever Servlet Can be used? Why struts uses ActionServlet why not ActionJSP?


Sandeep
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

This question gets asked a lot. Please look through previous posts for the answers.

Short version: JSPs are most suitable for renderrng HTML views. They are not well-suited to performing processing. Best practices dictate that the combination of servlets (to do the processing) and JSPs to render the HTML is the best pattern to follow.
[ September 29, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Difference between Servlet and JSP Interview question
 
Similar Threads
jsp vs servlet
Servlet and JSP
Difference between JSP and Servlet
jsp
JSP & Servlets