• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

In MVC

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a architecture pattern like MVC, it is mandatory that Servlet should
be the controller, why not JSP?
 
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Their are couple of reasons for using servlet and not jsp as controller component.

1) JSP should not include the java code which is the integral part in building the controller as you need to perfrom various checks on in coming request.

2) JSP is meant for the developers which need not have the java knoeledge

3) Your controller intracts with your model and hence not directly accessed from the browser which is not the case with the JSP
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I started to type up a response but the following article (almost 10 years old) does a better job:

http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html

Nothing is "mandatory" but if you have ever worked on a project with 2000 line JSP files you will know how hard they are to develop, debug and maintain.

- Brent
 
I found some pretty shells, some sea glass and this lovely tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic