MVC model

MVC model

M ... Model

Java class Application processing (calculation processing, etc.), data storage

V ... View

JPS file Screen display

C ... Controller

Servlet class Request reception, processing execution request (Model), result display request (View)

Transfer process

forward

Move processing to another Servlet class or JPS class (internal) URL is the state at the time of request

Description


RequestDispatcher dispatcher = request.getRequestDispatcher("Forward destination");
dispatcher.forward(request, response);

redirect

Move processing to another Servlet class or JPS class (external) URL changed to redirect destination

Description


response.sendReddirect("Redirect URL");

Recommended Posts

MVC model
What is MVC model?
[Note] MVC model simple summary
A simple example of an MVC model
Class and model
What is the Java Servlet / JSP MVC model?
The MVC model at my workplace is terrible
Various MVC models
[Rails] Model Association (Association)
Understanding the MVC framework with server-side Java 2/4 Model