Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet is used as controller

 
rex tony
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why servlet is used as controller ?not JSP?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34401
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JSP is for display purposes. In MVC, it shouldn't have any logic at all. Let alone control logic.

The servlet is responsible for the control logic. In Struts, it uses the XML file to gain this logic. It then redirects to the actions for the app specific logic.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic