1. The difference between the get and post methods of HTTP requests
Get can be cached and saved by the browser, primarily for data acquisition.
Post cannot be cached and will not be saved by the browser for form submission
2. Explain what a servlet is
Servlets have a good life cycle, including loading and instantiation, initialization, processing requests, end of service
init, service, Destory represented by the Javax.servlet.Servlet interface
3, talk about the life cycle of the servlet.
Web server loading servlet----->servlet loading Start instantiation
Servlet initialization----->init () method
servlet Processing Request----->sevice () method (Doget\dopost)
Servlet Service End----->web container call Destory ()
4. The difference between forward () and redirect () in the Servlet API
Forward () is a forwarding, control in the container of the steering, the client address bar will not show the address after the turn
Redirect () is redirected, the browser will get the address after the jump
5, under what circumstances call Doget () and Dopost ()?
The method property of the from tag in the JSP page is called doget () when it is get, and is called when the Post is Dopost ()
6. The main method of request object
SetAttribute (), getattribute ()
7. What is the difference between request.getattribute () and Request.getparameter ()?
GetAttribute () is the data value in the object container, which is the value in the session
Getparamter () Gets the data for the form or URL redirection
8. What are the built-in objects of JSP? What are the roles? What are the different methods?
Request user-side requests
Response Web page back to the client's response
Session period associated with the request
What the application servlet is doing
PageContext Page Properties
Output used to transmit a response
Config Servlet's architectural parts
Page JSP pages themselves
Exception for the error page
9. Similarities and differences between JSP and servlet
JSP is the technical extension of the servlet, and the JSP is "class servlet" after compiling.
JSP focuses on Views, servlet focuses on control logic
10. What are the technologies that are implemented in each part of MVC? How is it implemented?
MVC is shorthand for Model-view-controller.
Model represents business logic (JAVABEAN,EJB)
View representation Views (JSP pages)
Controller representation Control (Servlet)
Java Web section