-
1.Servlets act as the controller in a MVC application -
Do not generate HTML -
Convert the incoming HTTP information to Java objects -
Interact with the business model -
Forward to JSPs to render the View -
2.JSP act as the View -
Do not contain business logic -
Simply display information
J2EE组件:
建立工程:
-
Creating an enterprise application project and associated module projects (Web module for servlet) -
Importing and creating module artifacts (create servlets, JSPs, and Web pages) -
Adding enterprise application project to a server configuration (run on server) -
Launching server in debug mode