文档介绍:web执行流程(Web execution flow)
Clearly a SSH framework of the WEB request details, FILTER+, scheduling process including JSP and SERVLET, Tomcat thread pool and JDBC connection pool, STRUTS2 interceptor and automatic assembly mechanism and related to the SPRING transaction, AOP, related and automatic assembly and related to the HIBERNATE CACHE. And automatic assembly and transaction mechanism;
A. JSP request
1. browser requests:
Generally, there are POST and GET methods, and the processing process is basically the same, so usually only one of them is implemented at the Servlet end, and then the implemented method is called in another method;
The difference between the two lies:
(1) parameter length:
The parameters of the GET method are limited in the browser address bar, so the length of the method is limited Separate paths and parameters - separate parameters;
The parameters of the POST method are placed in the message body, so there is no length constraint;
(2) safety
The parameters of the GET method are visible in the address bar, so they are unsafe;
The parameters of the POST method are not visible in the message body, so they are safer;
(3) bookmarks
GET can be established, and POST cannot be established;
(4) idempotent
Theoretically, the GET method should be idempotent (can be repeated many times without side effects), and the POST method is non idempotent, which is not necessarily in practical application;
(5) transcoding difference
In practice, GET and POST will have a problem, namely GET method parameters usually requires manual decoding, but POST is not needed, because the application server encoding is not set correctly, the default is ISO-8859-1;
2. through Filter
(1) in general, we need to go through the SPRING character set transcoding mechanism, CharacterEncodingFilter, used to deal with the front JSP page and the background JAVA code coding mechanism is different;
(2) then go through other Filter, sometimes permissions and sec