1 How JSP works
For:
The Dynamic Web technology standard BLABLA...JSP program works in the request/Response mode, the client issues an HTTP request, the JSP program receives the request, processes it, and returns the result of the processing.
JSP programs need to be run on a particular Web server, such as Tomcat,weblogic. All JSP files will be executed by the server-side JSP engine into the servlet program (Java source file), and then call the Java compiler to compile the servlet program as a class file, and the Java virtual machine to interpret the execution.
When a client browser requests a JSP page (for example, test.jsp) from a Tomcat server, it generates two files in the%catalina_home%\work\catalina\ directory, _test_jsp.java and _test_, respectively Jsp.class, they are servlet programs and class files that are generated based on JSP pages.
2 JSP nine large built-in objects (interview was asked 100 times, or sometimes do not remember the whole.) )
Request response Out Session Application Page PageContext config exception
3 page, request, session, main differences between application objects
(1) Different types
The page is of type object, request is HttpServletRequest type, session is HttpSession type, and application is ServletContext type
(2) different scope of action
Application: global scope, entire application sharing, life cycle from application startup to stop
Session scope, when the user first accesses a new session, the server can remember the session state, the life cycle is the session time-out or the server-side forces the session to expire.
Request: A request scoped by the client. Lifecycle requests or uses forward to perform request forwarding
Page: A JSP page is valid
The scope of Page,request,session,application objects is increasing, and the life cycle of the request and page is short. The difference between them is that a request can die with multiple page pages (Include,forward and filter)
Some simple problems in "Jsp/servlet" Javaweb