当前位置:网站首页>request.getSession(),的故事
request.getSession(),的故事
2022-08-02 05:46:00 【金箍一梦何来愁】
1、request.getSession()可以帮你得到HttpSession类型的对象,通常称之为session对象,session对象的作用域为一次会话,通常浏览器不关闭,保存的值就不会消失,当然也会出现session超时。服务器里面可以设置session的超时时间,web.xml中有一个session time out的地方,tomcat默认为30分钟
2、项目里面
request.getSession().setAttribute("UserAuthority", sessionUser);,就是创建一个session有效期是30分钟
边栏推荐
- Xgboost报错 ValueError: Invalid shape: (1650, 2) for label
- BGP experiment (route reflector, federation, route optimization)
- The installation of NPM, CNPM
- Not annotated parameter overrides @NonNullApi parameter
- DNS的解析流程
- Practice on optimizing startup performance of VS Code
- Leetcode parentheses matching problem -- 32. The longest parentheses effectively
- node安装和配置(node-v12.20.2-x64 ) 以及node版本切换介绍
- Not annotated parameter overrides @NonNullApi parameter
- node安装及环境配置
猜你喜欢
MySQL 5.7 installation tutorial (full-step, nanny-level tutorial)
Analysis of port 9848 error at startup of Nacos client (non-version upgrade problem)
npm 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
APT + Transform 实现多模块应用Application生命周期分发
Not annotated parameter overrides @NonNullApi parameter
pytorch basic operations: classification tasks using neural networks
人工神经网络
MySQL 5.7 安装教程(全步骤、保姆级教程)
node安装及环境配置
秒杀系统小demo
随机推荐
Ant three sides: MQ message loss, duplication, backlog problem, what are the solutions?
C# 编码规范手册
APT + Transform to realize multi module Application distributed Application life cycle
Home NAS server (4) | MergerFS and SnapRaid data backup
BGP+MPLS Comprehensive Experiment
MySQL(3)
Analysis of the source code of the JS UI framework of Hongmeng system
武汉高性能计算大会2022举办,高性能计算生态发展再添新动力
NPM ---- 安装yarn
mysql高阶语句(一)
Understand C operators in one article
MySQL联合查询(多表查询)
Smart people's game improvement: Chapter 3, Lesson 2: "Number of Tongtong" (number)
C# Coding Conventions Handbook
直播系统聊天技术(八):vivo直播系统中IM消息模块的架构实践
MySQL 23道经典面试吊打面试官
Not annotated parameter overrides @NonNullApi parameter
Py之mlxtend:mlxtend库的简介、安装、使用方法之详细攻略
SphereEx苗立尧:云原生架构下的Database Mesh研发实践
Nacos database configuration