Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MVC - are JSPs view or controller ?

 
Gagan Indus
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
in MVC pattern , where does the JSPs/servlets fit in ?
are they View or are they controller ?
I guess controller


------------------
Gagan (/^_^\) SCJP2
Die-hard JavaMonk -- little Java a day , keeps u going .
 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gagan,
In MVC Servlets takes the role of a Controller and JSP of a View.This is the case if your application is a combination of JSP/Servlets.As JSP can be used at evry place where a servlet is used in that case, both the controller and the view are JSP.
 
morph wang
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
according JSP Model 2 architecture,
the three tier of MVC:
JSP ------> View
Servlet ------> Controller
JavaBean ------> Model
Ref: http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html
 
Gagan Indus
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thankxx Rishi n Morph
things are certainly getting clearer now
------------------
Gagan (/^_^\) SCJP2
Die-hard JavaMonk -- little Java a day , keeps u going .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic