File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes mvc 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "mvc 2" Watch "mvc 2" New topic

mvc 2

rex tony
Ranch Hand

Joined: Aug 29, 2007
Posts: 159
Without struts Framework,Can we implement MVC2 with normal JSP,Servlet?
Katrina Owen

Joined: Nov 03, 2006
Posts: 1367
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:

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

Joined: Jan 10, 2002
Posts: 63552

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.

[Asking smart questions] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63552

P.S. There's no mvc 1 or 2, It's just MVC. You may be thinking of Model 2.
I agree. Here's the link:
subject: mvc 2
It's not a secret anymore!