11.0 MVC
11.0 MVC
MVC
What is MVC ?
• MVC stands for Model View Controller.
NOTE : To get more details about how to compile and copy the class
files with package to the “Tomcat” root, refere to “6.0_JSP_Filters.pptx”
Creating Model
(User.java)
We will create a new Java Project in NetBeans, create a new
Java class file “User.java” in it.
Add the following reference to the project as well
Creating Controller
(UserController.java)
After creating Java code, “clean-compile” to create the class files,
copy them from the “…build\classes\” folder and put them in the
“…tomcat\webapps\ROOT\Web-INF\classes\” folder as follows :
Creating View
(main.jsp and
user-list.jsp)
Modifying “web.xml”