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 7769299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:07:32+00:00 2026-06-01T16:07:32+00:00

In the MVC architecture, the controller is what decides which user request is to

  • 0

In the MVC architecture, the controller is what decides which user request is to handled by which component (which servlet, in the case of Java EE). Then, is the logic used inside the servlet (calling business methods or EJBs, etc) which is used to create the data that should be given to the view, called the model ?

In some books, its written that the servlet passes the model to the JSPs. In this sense, model is the data that is passed to the JSP. What’s the correct meaning of ‘model’ in a typical Java EE architecture ?

  • 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-06-01T16:07:33+00:00Added an answer on June 1, 2026 at 4:07 pm

    The model can concern both the “business model” and the “data model”. The business model is also known as “business delegates”, “domain objects”, “service facades” or anything in this sense. In a well designed Java EE web application according the standards, it are the EJB classes which does not use JPA or any DB access logic directly but delegate further to other EJB classes which are pure DAO objects.

    E.g.

    @Stateless
    public class ShoppingServiceLocal implements ShoppingService {
    
        @EJB
        private ProductDAO productDAO;
    
        @EJB
        private OrderDAO orderDAO;
    
        @Override
        public List<Product> searchProducts(String query) {
            return productDAO.find(query);
        }
    
        @Override
        public Order orderProduct(User user, Product product, int quantity) {
            product.setAvailable(product.getAvailable() - quantity);
            productDAO.update(product);
            Order order = new Order(user.getId(), product.getId(), quantity);
            orderDAO.create(order);
            return order;
        }
    
    }
    

    Note that, since this is an EJB, the ProductDAO#update() and OrderDAO#create() are done in a single transaction. So if creating the order throws an exception, the edited availability won’t be persisted as well.

    The “data model” are the Product, User and Order in the above example, which are supposed to be JPA @Entity javabeans. This is all what the servlet (the controller) and JSP (the view) knows about.

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

Sidebar

Related Questions

Here is the idea: When the user wants to see /controller/action, then I want
I am using a Cairngorm MVC architecture for my current project. I have several
I am new to ASP.net MVC architecture. I have read in some articles that
Wondering the pros and cons for MVC architecture in terms of web application development?
If we develop a winform app using an MVC architecture, it should not be
I'm somewhat new to the ASP.NET MVC architecture and I'm trying to sort out
How would one typically implement a service layer in an MVC architecture? Is it
i am following sencha touch 2.0.0 MVC architecture. there are a tab panel in
I have a PHP application that is built around the MVC architecture without any
I've searched around and found that when implementing an authentication module in MVC architecture

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.