`
icess
  • 浏览: 251327 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Tomcat 问题: Cannot serialize session attribute XXX for ..的解决办法

阅读更多

在关闭和重启Tomcat 5时, tomcat 会试图 serialize存在的session资源. 如果 sessions中相关的对象没有实现 serializable 接口, 就会出现Cannot serialize session attribute XXX  for  异常.

如果你不想看到该异常, 也不想保存session. 那么你可以在项目部署描述文件中(如. test.xml,)(instead of just exploding the war)  的  <Context> tags中间 加上 :
<Manager className="org.apache.catalina.session.PersistentManager"
saveOnRestart="false"/>
这样 tomcat 在关闭的时候就不会保存session资源了.


你也可以在server.xml中指定上面的值. 这也所有的程序都使用这个设置了.

 

试试看.

分享到:
评论

相关推荐

    PyPI 官网下载 | monero-serialize-2.0.3.tar.gz

    资源来自pypi官网。 资源全名:monero-serialize-2.0.3.tar.gz

    PyPI 官网下载 | serialize-images-0.1.1.tar.gz

    《PyPI官网下载:serialize-images-0.1.1.tar.gz——深入了解Python图像序列化库》 在Python的生态系统中,PyPI(Python Package Index)是最重要的资源仓库,它为开发者提供了海量的开源库和模块,方便他们快速...

    com.alibaba.fastjson json解析工具包

    `com.alibaba.fastjson`是阿里巴巴开发的一个高性能的Java JSON库,被广泛应用于各种JSON处理场景,如数据序列化、反序列化、JSON字符串解析等。它以其高效、易用和全面的功能,深受Java开发者喜爱。...

    form-serialize-and-calculate.html

    form-serialize-and-calculate.html

    Jquery各种手册

    3. 特性选择器:`[attribute]、[attribute=value]、[attribute^=value]、[attribute$=value]、[attribute*=value]、[attribute!=value]`。 三、DOM操作 1. 选择元素:`.find()、.children()、.parent()、.closest...

    php.ini-development

    Please see the actual settings later in the document for more details as to why ; we recommend these changes in PHP's behavior. ; display_errors ; Default Value: On ; Development Value: On ; ...

    Serialize-javascript.zip

    Serialize-javascript 能够序列化 JavaScript 库成含有正则表达式和功能的 JSON 包。示例:var serialize = require('serialize-javascript'); serialize({  str : 'string',  num : 0,  obj : {foo: ...

    Visual C 教学课件:第7章 文档视图结构.ppt

    3. 文档对象(CDocument派生类):文档对象是数据存储和管理的核心,通常通过序列化(Serialize)方法实现数据的读写,同时也处理WM_COMMAND消息,以响应用户对数据的操作。 4. 视图对象(CView或其派生类):视图...

    云计算与大数据应用开发 第六章:云计算应用开发(一).pdf

    JSON保留了C的特性,大部分编程语言都可以方便的将对象转为JSON(序列化,Serialize),或将JSON转为对象(反序列化,Deserialize)。 在Python和JavaScript中,我们可以使用json模块和JSON对象来实现JSON的序列化...

    ajax-axios-url-form-serialize 插件

    **Ajax Axios URL Form Serialize 插件详解** 在Web开发中,数据交互是不可或缺的一部分,而Ajax技术正是实现页面异步更新的关键。随着前端框架的不断发展,像Vue.js这样的库广泛使用,Axios作为一款强大的HTTP...

    Python库 | flask_serialize-1.0.9-py2.py3-none-any.whl

    资源分类:Python库 所属语言:Python 使用前提:需要解压 资源全名:flask_serialize-1.0.9-py2.py3-none-any.whl 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059

    Android代码-yamlbeans

    YamlBeans makes it easy to serialize and deserialize Java object graphs to and from YAML, a human-friendly data format. Replace XML and properties files with YAML for more expressive power (lists, ...

    Android代码-CacheUtilsLibrary

    This is a simple Android utils library to write any type of data into cache files and then read them later, using Gson to serialize and deserialize these data. 中文版请看这里。 Gradle compile '...

    Python库 | django_serialize-1.3.1-py2.py3-none-any.whl

    资源分类:Python库 所属语言:Python 资源全名:django_serialize-1.3.1-py2.py3-none-any.whl 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059

    前端项目-jquery-serialize-object.zip

    本项目"前端项目-jquery-serialize-object"关注的是使用jQuery来序列化表单字段,将它们转换为JavaScript对象或JSON格式,这在提交表单数据到服务器时尤其有用。下面我们将深入探讨这一主题。 1. **jQuery 序列化...

    SpringMvc的跨域解决方案_2.docx

    ### Spring MVC 的跨域解决方案 #### 一、跨域概念及背景 跨域是指Web浏览器在访问不同域名下的资源时,由于同源策略(Same-origin policy)的限制而产生的问题。同源策略是为了提高Web安全而引入的一种机制,它...

    Json.net for .net3.5

    Quickly read and write JSON using the JsonReader and JsonWriter or serialize your .NET objects with a single method call using the JsonSerializer. Json.NET's features include: - Lightning fast ...

    分布式Session的一个实现.

    String serializedData = serialize(sessionData); jedis.set(sessionId, serializedData); } public Map, Object&gt; getSession(String sessionId) { // 从Redis获取session数据并反序列化 String ...

Global site tag (gtag.js) - Google Analytics