public static int httpPort(HttpServletRequest request) {
        try {
            return new URL(request.getRequestURL().toString()).getPort();
        } catch (MalformedURLException excp) {
            return 80;
        }
    }
public static int httpPort(HttpServletRequest request) {
        try {
            return new URL(request.getRequestURL().toString()).getPort();
        } catch (MalformedURLException excp) {
            return 80;
        }
    }
public static int httpPort ( HttpServletRequest request ) { try { return new URL ( request . getRequestURL ( ) . toString ( ) ) . getPort ( ) ; } catch ( MalformedURLException excp ) { return 80 ; } }
获取HTTP端口

@param request 当前请求
@return http端口
获取HTTP端口