HttpServletRequest.getLocalAddr()
时间: 2023-11-01 17:20:32 浏览: 179
HttpServletRequest详解.docx
HttpServletRequest.getLocalAddr()是一个方法,它返回服务器的IP地址。在通过网络连接时,客户端向服务器发送请求,服务器收到请求后会使用HttpServletRequest对象来处理请求。这个对象包含了请求的各种信息,其中之一就是服务器的IP地址。所以,当调用HttpServletRequest.getLocalAddr()方法时,它会返回服务器的IP地址。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Java HttpServletRequest.getRemotePort方法代碼示例](https://blog.csdn.net/weixin_30878051/article/details/114721735)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [servlet2.4doc](https://download.csdn.net/download/fandongbao/1890712)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [HttpServletResquest总结](https://blog.csdn.net/weixin_40684476/article/details/83473894)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文