logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

spring 管理action实例 scope="session"

很多人都采用scope="request"这种解决方案,殊不知此方治标不治本,原因:scope="request"表示每次请求都要创建一个action实例,spring容器会很累的,以下是我的解决方案:写一个拦截器:public class ClearFieldErrorInterceptor extends AbstractInterceptor {private

#spring#struts
ServletContextListener使用详解

在 Servlet API 中有一个 ServletContextListener 接口,它能够监听 ServletContext 对象的生命周期,实际上就是监听 Web 应用的生命周期。当Servlet 容器启动或终止Web 应用时,会触发ServletContextEvent 事件,该事件由ServletContextListener 来处理。在 ServletContextListene

#servlet#数据库#java
到底了