This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet versus JSP - Urgent  RSS feed

 
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.
 
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.
 
All of the following truths are shameless lies. But what about this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!