Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 281747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:13:47+00:00 2026-05-12T05:13:47+00:00

Can anyone post or point me in the direction of a clear example of

  • 0

Can anyone post or point me in the direction of a clear example of a from scratch implementation of Model 2 architecture?

Below is a detailed description of Model 2, taken from this page.

The Model 2 architecture for designing JSP pages is in reality, Model View Controller (MVC) applied to web applications. Hence the two terms can be used interchangeably in the web world. MVC originated in SmallTalk and has since made its way into Java community. Model 2 architecure and its derivatives are the cornerstones for all serious and industrial strength web applications designed
in the real world. Hence it is essential for you understand this paradigm thoroughly. Figure 1.2 shows the Model 2 (MVC) architecture.

The main difference between Model 1 and Model 2 is that in Model 2, a controller handles the user request instead of another JSP. The controller is implemented as a Servlet. The following steps are executed when the user submits the request.

  1. The Controller Servlet handles the user’s request. (This means the hyperlink in the JSP should point to the controller servlet).
  2. The Controller Servlet then instantiates appropriate JavaBeans based on the request parameters (and optionally also based on session attributes).
  3. The Controller Servlet then by itself or through a controller helper communicates with the middle tier or directly to the database to fetch the required data.
  4. The Controller sets the resultant JavaBeans (either same or a new one) in one of the following contexts – request, session or application.
  5. The controller then dispatches the request to the next view based on the request URL.
  6. The View uses the resultant JavaBeans from Step 4 to display data. Note that there is no presentation logic in the JSP. The sole function of the JSP in Model 2 architecture is to display the data from the JavaBeans set in the request, session or application scopes.
    MVC example
    (source: java-samples.com)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:13:47+00:00Added an answer on May 12, 2026 at 5:13 am

    I like Bear Bibeault’s
    article from a few years ago. High level explanation, but very clear.

    This is his implementation of an MVC “framework”. I learned a lot by going through it:

    Bear Bibeault’s Frontman

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was wondering if anyone can post an example of how to get a
Can anyone point me in the right direction on how I can set up
Can anyone point me in the right direction on how to save the editable
Can anyone post the steps for integrating mercurial to phped. I followed the following
Can anyone post a sample code wherein theres a running timer(javascript settimeout) and doing
Can anyone tell me if I can (in the command line) issue a POST
I have a DataList control that displays a set of elements. Can anyone point
Can anyone let me know how can we change the value of kendo combobox
Can anyone enlighten me to a way I can Highlight the content of an
Can anyone explain to me why this program: for(float i = -1; i <

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.