1.
<% --... -- %> Hide comments
<! --... --> Dynamic annotation, displayed in the document, and the JSP expression can be interpreted inside the comment;
2.
% Tomcat_home %/CONF/server. xml
<Context Path = "/book"
Docbase = "webapps/book">
</Context>
3.
Declaration <%! Declaration (s) %> has class, object scope
Expression <% = expression %> has a method scope. (An expression cannot end with a; sign)
The script applet <% scriptlet %> can also declare a variable here, and the variable has a method scope.
Considering the thread-safe relationship, local variables are declared first in the expression, and the declaration is usually used to declare Read-Only variables (final)
4.
Synchronize variables in JSP declarations or use a page command to set the isthreadsafe attribute to false
<% Synchronized (this ){
If (..){}
}
%>
5.
The difference between servletrequest. getrequestdispatcher andServletContext.getRequestDispatcher(java.lang.String)
Is that this method can take a relative path.
6.
Getmoduleconfig (). findforwardconfig (string)
Response. senderror (httpservletresponse. SC _bad_request, getinternal (). getmessage ("noauthorized, mapping. getpath ()));
There are two ways to switch between sub-application modules. 1. Global or local <forward> element 2. Switchaction