• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mvc 2

 
rex tony
Ranch Hand
Posts: 159
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without struts Framework,Can we implement MVC2 with normal JSP,Servlet?
 
Katrina Owen
Sheriff
Pie
Posts: 1367
18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The short answer is "yes". You don't need to implement a framework in order to use the model-view-controller approach.

Here is an article written by one of the staff members about MVC:
http://faq.javaranch.com/java/Model1Model2MVC

My understanding is that you can create the 'model' in the form of Beans or regular (if there is such a thing) Java objects, put the View in your .jsp, then use the Servlet to orchestrate the whole thing, passing calls to the model, the model returns information, and that information can in turn be passed to the view.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course. Frameworks like Struts and Spring and all the others (including my own Frontman) are all written using the normal JSP and Servlet mechanisms.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. There's no mvc 1 or 2, It's just MVC. You may be thinking of Model 2.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic