HTTPSession变量限制 [英] HTTPSession variable limit

查看:97
本文介绍了HTTPSession变量限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTTPSession变量可以容纳的最大数据限制(即大小)是多少?如果超过此限制会发生什么?最重要的是,如果大小超过HTTPSession变量可以容纳的最大大小,那么在整个会话中拥有数据的替代方法是什么?

What is the maximum limit (i.e. size) of data that a HTTPSession variable can hold? What will happen if this exceeds? And most importantly, what is the alternative approach to have the data throughout the session if the size exceeds the maximum size that a HTTPSession variable can hold?

推荐答案

除了服务器的内存外,没有其他限制.替代方法是

There is no limit, other than the memory of your server. The alternatives are

  • to run your server with more memory
  • to configure the server to swap sessions to disk (see http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html for Tomcat)
  • to avoid putting large data in the session, and to use a cache or a database to store them instead.

这篇关于HTTPSession变量限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆