1, first say a CSS: CSS with Chinese (such as font definition) attribute definition is best placed in the selector definition of the last bar, why----encoding format problem.
2, in fact, they can also write their own dispatcherservlet+jsp:include action to do the full transparency of the public template + sub-page combination, of course, this also requires some public agreement problems.
3, about the absolute URL problem, the absolute URL on the server side is the publish directory as the root directory (the simplest example: servlet mapping URL sample), which is already included in the previous WebApp AppName, and the client uses the domain absolute URL is/appname/ The beginning.
4, CSS also has the encoding format command:
@CHARSET "UTF-8";
5, a section of the customer's IP code (ZT from http://lijie250.javaeye.com/blog/251616):
Publicstring getipaddr (HttpServletRequest request) {string IP= Request.getheader ("X-forwarded-for"); if(IP = =NULL|| Ip.length () = = 0 | | "Unknown". Equalsignorecase (IP)) {IP= Request.getheader ("Proxy-client-ip"); } if(IP = =NULL|| Ip.length () = = 0 | | "Unknown". Equalsignorecase (IP)) {IP= Request.getheader ("Wl-proxy-client-ip"); } if(IP = =NULL|| Ip.length () = = 0 | | "Unknown". Equalsignorecase (IP)) {IP=request.getremoteaddr (); } returnIP; }
Web Development Issue Records