• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet versus JSP - Urgent

 
Mauricio Andrade JR
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm newbee to Java and need a urgent answer. At my company we are starting java development and there is a consultor helping us. We asked him to teach us how to hard code a MVC controller, as we had used struts before. The problem is that he did the controller as a JSP page! I always thought it would not be something that one put in a JSP page. I think the controller should be a servlet but I don�t have enough knowledge to argue with him. And he�s leaving. So, technicaly speaking, how could I prove to him that he�s wrong in doing such a thing ???

Thanxs,
Mauricio.
 
Michael Zalewski
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is possible to put the controller into the JSP page. It's not the MVC model used by Struts, but it could still be called MVC. So your contractor may not necessarily be incorrect.
For example, one platform which puts the controller into the JSP page is SOFIA
Ask yourself the following: Is there a seperate model, such as a Java Bean? Is there a seperate View (such as the JSP page)? And what builds and manipulates the model? If the JSP page is creating and manipulating the model directly, that is probably not MVC. But if the JSP page creates some special object which creates and manipulates the model, that special object could be a controller.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!