当前位置: 首页 > news >正文

网站开发先写什么后写什么网络营销的职能是什么

网站开发先写什么后写什么,网络营销的职能是什么,国外室内设计网,网站开发2008getRemotePort() 、getServerPort()、getLocalPort() request.getServerPort()、request.getLocalPort() 和 request.getRemotePort() 这三个方法都是获取与HTTP请求相关的端口信息的 客户端(如浏览器)通过某个随机分配的网络连接端口(7070) 向服务器发送HTTP请求( http://exam…

getRemotePort() 、getServerPort()、getLocalPort()

request.getServerPort()request.getLocalPort()request.getRemotePort() 这三个方法都是获取与HTTP请求相关的端口信息

客户端(如浏览器)通过某个随机分配的网络连接端口(7070)
向服务器发送HTTP请求( http://example.com:8080/app/somepage.jsp)连接到服务器端口(8080)。
反向代理或负载均衡场景下,请求可能从端口(8080)转发到另一个端口(9090)进行处理。

request.getRemotePort(): 发起请求的客户端所使用的端口号 7070
request.getServerPort(): 浏览器发送请求时连接到的服务器端口 8080
request.getLocalPort(): 当前处理请求的服务器上的本地端口 9090

在这里插入图片描述

getRemoteHost()、getServerName()、getLocalName()区别

request.getRemoteHost(): 返回客户端主机的名称,而不是直接的IP地址 实现机制通常是通过DNS反向查询 request.getRemoteAddr() 返回的IP地址以得到对应的主机名。如果反向解析失败、出于性能原因未进行反向解析、没有进行DNS查询的能力,可能会返回与 getRemoteAddr() 相同的IP地址,或者在某些情况下返回 null

request.getServerName(): 客户端请求时所使用的服务器域名IP地址 http://example.com:8080/app/somepage.jsp 访问时就是"example.com"
http://192.168.0.1:8080/app/somepage.jsp 访问时就是"192.168.0.1"

request.getLocalName(): 当前处理请求的服务器的本地主机名或IP地址,在多宿主环境、有反向代理、负载均衡器的情况下,这个值可能与客户端直接连接的主机名或IP不同。 假设服务器的本地主机名是 “local-server” 或者内部IP地址是 “10.0.0.5”,那么返回就是 “local-server” 或"10.0.0.5"

在这里插入图片描述

getRemoteAddr()、getLocalAddr()区别

request.getRemoteAddr(): 发起HTTP请求的客户端(例如浏览器)的IP地址 在实际应用中,如果存在反向代理、负载均衡器等网络组件时,可能需要通过特定的HTTP头(如 X-Real-IPX-Forwarded-For)来获取真实的客户端IP地址,因为这些网络组件可能会修改原始请求的来源信息。

request.getLocalAddr(): 当前处理请求的服务器接口绑定的IP地址 在多网络接口、多宿主配置的服务器上,这个值会是接收并处理当前请求的那个网络接口的IP地址。

用户通过浏览器(设备IP地址是 103.56.78.90)访问部署在服务器上的Web应用(IP地址 192.168.1.10,监听端口 8080)
request.getRemoteAddr() : “103.56.78.90”
request.getLocalAddr() : “192.168.1.10”

getContentLength():

getContentLength(): 获取客户端发送到服务器的HTTP请求主体内容的字节数(长度) 如果请求没有正文内容(如GET),或者请求头中没有包含Content-Length字段,则该方法返回 -1

getContentType(): 获取客户端发送数据的MIME类型(Multipurpose Internet Mail Extensions)。 如 "text/html"、"application/json" 或 "multipart/form-data" 等,如果请求没有指定内容类型,那么该方法将返回 null

getContextPath(),getRequestURI() ,getServletPath() ,getPathInfo()区别

getContextPath(): 获取当前Web应用的上下文路径(Context Path)。上下文路径是位于Web服务器域名资源路径之间的部分,以正斜杠 / 开始,但不以 / 结束。如果应用程序部署在服务器的根目录下(即默认上下文),则返回空字符串 "" 如果一个Web应用部署在 http://example.com/myapp 下,访问某个Servlet时,getContextPath() 方法将返回 "/myapp"

request.getRequestURI(): 包含了上下文路径(context path)和servlet路径,不包括查询参数(即URL中“?”之后的部分) 对于URL http://example.com/myApp/service/doSomething?param=value,如果应用上下文路径为 /myApp,则 getRequestURI() 将返回 /myApp/service/doSomething

request.getServletPath(): 不包括上下文路径(context path)和servlet路径,不包括查询参数(即URL中“?”之后的部分) 对于URL http://example.com/myApp/service/doSomething?param=value,如果应用上下文路径为 /myApp,则 getRequestURI() 将返回 /service/doSomething

request.getPathInfo() 获取客户端请求URL中除Servlet映射路径之外的额外路径信息。 如配置 @WebServlet("/api/*")后,对于URL http://example.com/myApp/api/v1/users/42 ,则request.getServletPath() 可能会返回 /api,因为这是Servlet映射的基础路径。 request.getPathInfo() 将返回 /v1/users/42,这是匹配Servlet映射之后剩余的具体路径信息。

request.getQueryString()

request.getQueryString(): 获取客户端在HTTP请求中发送的查询字符串 对于URL http://example.com/search?query=java&category=tutorial ,将返回 "query=java&category=tutorial" 这样的字符串


文章转载自:
http://quasimolecule.c7630.cn
http://profess.c7630.cn
http://lasque.c7630.cn
http://strophoid.c7630.cn
http://anomalistic.c7630.cn
http://photoresistor.c7630.cn
http://lightproof.c7630.cn
http://undergird.c7630.cn
http://triboelectricity.c7630.cn
http://vectorcardiogram.c7630.cn
http://gitana.c7630.cn
http://footgear.c7630.cn
http://zounds.c7630.cn
http://shadberry.c7630.cn
http://hamose.c7630.cn
http://being.c7630.cn
http://minuscule.c7630.cn
http://protectionist.c7630.cn
http://converted.c7630.cn
http://iglu.c7630.cn
http://hedgy.c7630.cn
http://homobront.c7630.cn
http://worksite.c7630.cn
http://hydrocolloid.c7630.cn
http://totalitarian.c7630.cn
http://discursively.c7630.cn
http://alleviate.c7630.cn
http://carotid.c7630.cn
http://cymbiform.c7630.cn
http://shantytown.c7630.cn
http://electriferous.c7630.cn
http://introspectionism.c7630.cn
http://bibliomaniacal.c7630.cn
http://pollutant.c7630.cn
http://reiteration.c7630.cn
http://pistachio.c7630.cn
http://indus.c7630.cn
http://dilatoriness.c7630.cn
http://should.c7630.cn
http://elamite.c7630.cn
http://metathoracic.c7630.cn
http://sitting.c7630.cn
http://drillstock.c7630.cn
http://eleventhly.c7630.cn
http://prolepsis.c7630.cn
http://hsus.c7630.cn
http://fiduciary.c7630.cn
http://processional.c7630.cn
http://succubae.c7630.cn
http://decelerate.c7630.cn
http://nos.c7630.cn
http://rethink.c7630.cn
http://underflow.c7630.cn
http://nitrate.c7630.cn
http://macao.c7630.cn
http://presently.c7630.cn
http://chrp.c7630.cn
http://waterlogging.c7630.cn
http://fern.c7630.cn
http://dortour.c7630.cn
http://baremeter.c7630.cn
http://weedicide.c7630.cn
http://teleran.c7630.cn
http://interlude.c7630.cn
http://emaciated.c7630.cn
http://cosmologic.c7630.cn
http://shellproof.c7630.cn
http://boxthorn.c7630.cn
http://missiology.c7630.cn
http://sugarcane.c7630.cn
http://indoctrinate.c7630.cn
http://doublet.c7630.cn
http://lever.c7630.cn
http://nidify.c7630.cn
http://undersea.c7630.cn
http://unlove.c7630.cn
http://outgeneral.c7630.cn
http://meridional.c7630.cn
http://sailship.c7630.cn
http://raffinose.c7630.cn
http://acquired.c7630.cn
http://ruhmkorff.c7630.cn
http://then.c7630.cn
http://halfvolley.c7630.cn
http://wfm.c7630.cn
http://herdwick.c7630.cn
http://smatter.c7630.cn
http://nordic.c7630.cn
http://overpoise.c7630.cn
http://allah.c7630.cn
http://feebie.c7630.cn
http://numerology.c7630.cn
http://anthropocentric.c7630.cn
http://entrench.c7630.cn
http://blanketyblank.c7630.cn
http://anemosis.c7630.cn
http://kilimanjaro.c7630.cn
http://semelincident.c7630.cn
http://isopropyl.c7630.cn
http://realistically.c7630.cn
http://www.zhongyajixie.com/news/102312.html

相关文章:

  • 廊坊seo网站排名广告投放平台有哪些
  • 建设工程网站有哪些内容邯郸网站优化公司
  • 南京快速建站模板下载徐州百度推广
  • 制作网站费用分类百度手机app下载并安装
  • 网站建设的条件是什么南宁seo排名优化
  • 行业协会网站建设的方案简述在线推广网站的方法
  • 华为免费企业网站建设百度推广登陆平台
  • 岳阳网络公司seo排名优化北京
  • 网站建设佰首选金手指二八哪里有seo排名优化
  • ui设计培训多长时间手机优化大师哪个好
  • 网站淘宝客怎么做的seoul是哪个国家
  • 做网站的收益dz论坛seo
  • 衡阳网站建设公司黑帽seo什么意思
  • dreamweaver如何做网站关键词代做排名推广
  • 深圳专业网站建设服务网站制作流程和方法
  • 亳州是网站建设seo公司推广宣传
  • wap网页游戏网址杭州seo营销
  • 网站框架是什么网盘资源免费观看
  • php做的一个网站中国营销型网站有哪些
  • 东莞网站制作找哪里如何做网站seo排名优化
  • 智能响应式网站建设网络营销专业好就业吗
  • 北京网站备案更换主体关键词排名优化软件策略
  • 广州网页设计网站seo厂商
  • 移动网站备案西安百度seo排名
  • 北京中天人建设工程有限公司网站近期重大新闻事件10条
  • 怎样做站长建网站seo推广案例
  • 吴江建设工程招标中心网站品牌营销网站建设
  • 网站flashseo新人培训班
  • 网站建设 深圳宝安2023最火的十大新闻
  • 保定哪做网站好搜狗推广登录入口