HttpServletRequest存值
时间: 2023-09-27 17:04:06 浏览: 99
HttpServletRequestS
HttpServletRequest可以使用setAttribute方法将信息存入request对象中。setAttribute方法接受两个参数,第一个参数是键名,第二个参数是被存入的信息对象。如果键名已经存在,会覆盖原来的值。被存入的信息可以在转发给其他servlet时被获取到。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [servlet中servlet context、session、request存放数据的作用域和常用方法](https://blog.csdn.net/xingyingz/article/details/125588821)[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_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文