Web Development Issue Records

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.