Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!