Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Servlet and JSP Interview question

 
Sandeep Awasthi
Ranch Hand
Posts: 597
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is difference between Servlet and JSP, can I use JSP where ever Servlet Can be used? Why struts uses ActionServlet why not ActionJSP?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64712
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic