- 浏览: 1972878 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (509)
- JavaEE (122)
- Oracle数据库 (29)
- JavaScript (37)
- SAP (5)
- MySql数据库 (7)
- JavaSE (4)
- Ajax (1)
- jQuery (13)
- SSH框架 (36)
- Web Service (10)
- JSF框架 (2)
- JBPM (0)
- ireport报表 (2)
- ibatis (5)
- Hibernate (31)
- JSP (11)
- Tomcat 服务器 (20)
- Other (19)
- JavaWeb (4)
- Maven (11)
- OSWorkFlow (10)
- HTML (13)
- Exception汇总 (7)
- SVN (2)
- 笑话 (1)
- JSTL (1)
- WebSphere Message Broker (13)
- ANT命令 (3)
- Liunx (12)
- Struts2 (26)
- Eclipse (6)
- DOS (3)
- Flex (11)
- WebSphere (1)
- 开发常用工具 (3)
- Junit (2)
- EJB (4)
- Struts1.2 (2)
- Jboss (1)
- Android (2)
- Java框架源码解析 (1)
- Spring (4)
- MyBatis (6)
- SpringMVC (4)
- Jetty (2)
- 数据库表设计 (1)
- SSO (4)
最新评论
-
贝塔ZQ:
也可以试试PageOffice插件,觉得更简单点
Jxl操作Excel设置背景、字体颜色、对齐方式、列的宽度 -
jia1208:
...
Could not publish server configuration for Tomcat v6.0 Server at localhost. -
u011274527:
赞
java.io.EOFException java.io.ObjectInputStream$PeekInputStream.readFully 错误 -
旭旭小牛啦:
怎么没哟了,继续赛
jQuery 选择器 -
wzw3919:
100行会报空指针
Java 解压缩zip文件
public class UserStatusListener implements ServletContextListener { /** * Servlet容器启动的时候,将会执行此方法; */ public void contextInitialized(ServletContextEvent event) { //获取applicationContext文件所在的路径; String path = event.getServletContext().getRealPath(File.separator) + event.getServletContext().getInitParameter("applicationContextConfigName"); // 把applicationContext.xml文件路径存在application作用域中; event.getServletContext().setAttribute("applicationContextPath",path); .... } /** * Servlet容器关闭时,则会执行此方法; */ public void contextDestroyed(ServletContextEvent arg0) { //其他操作 } }
其中applicationContextConfigName是配置在WEB-INF/web.xml文件中
<!-- 监听时读取,Spring配置文件目录 --> <context-param> <param-name>applicationContextConfigName</param-name> <param-value>WEB-INF/applicationContext.xml</param-value> </context-param>
发表评论
-
大型互联网服务集成平台:springmvc+mybatis+restful+webservice+quartz+bootstrap html5
2015-04-13 21:49 81SpringMVC + Mybatis + SpringSe ... -
大型互联网服务集成平台:springmvc+mybatis+restfull+JMS+webservice+bootstrap
2015-04-12 23:36 22SpringMVC + Mybatis + SpringS ... -
大型互联网服务集成平台:springmvc+mybatis+restfull+JMS+webservice+bootstrap
2015-04-12 23:33 83SpringMVC + Mybatis + SpringS ... -
Maven构建大型互联网架构springmvc+mybatis+Restfull+Webservice+Bootstrap
2015-04-12 23:28 71SpringMVC + Mybatis + SpringS ... -
手机App后台架构:Springmvc+SpringSecurity+mybatis+Rest+Quartz+Bootstrap Html5( Maven构建)
2015-04-09 01:39 76APP后台架构Maven构建,模拟大型互联网架构,支持高并发 ... -
maven构建springmvc+mybatis+rest+webservice+bootstrap html5(cms开源项目)
2015-04-09 01:21 85SpringMVC + Mybatis + SpringS ... -
通过WebApplicationContextUtils工具类获取ApplicationContext对象.
2011-12-18 21:03 10192通过WebApplicationContextUtils工具类 ... -
Spring中二级缓存的配置
2011-12-18 20:40 22081.首先,在spring的hibernate配置里(app ... -
springframework java.lang.ClassNotFoundException
2011-12-11 23:49 2547springframework java.lang. ... -
java.lang.ClassNotFoundException: org.apache.commons.collections.map.LinkedMap
2011-12-11 23:23 3240下面这个错误是少了commons-collections.ja ... -
net.fckeditor.connector.ConnectorServlet java.lang.ClassNotFoundException: net.
2011-11-17 14:56 2496今天在整合struts2+ibatis2.16+spring2 ... -
log4j文件日志配置
2011-11-16 19:03 2849下面是一段最常见的日志配置模板: #输出到控制条to co ... -
Line: 209 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:209:-1
2011-11-14 21:27 1540问题链接: http://www.iteye.com/pro ... -
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStore
2011-11-14 14:34 14769Exception in thread "main& ... -
获取容器中WEB-INF或者classes目录下的配置文件
2011-11-04 17:07 5807获取Tomcat容器中WEB-INF路径下的文件. 在Ser ... -
解决spring配置文件没有提示的问题。
2011-11-03 00:16 2738我们使用eclipse编辑spring ... -
The reference to entity "characterEncoding" must end with the ';' delimiter
2011-10-06 12:44 2148在配置Spring 的数据源的时候,想把url配置下面加一个 ... -
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
2011-10-06 12:31 6061在配置Spring文件的时候..从别的文件中复制过来的头文件。 ... -
java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice
2011-10-05 22:59 12842本人在整合Struts2+Hibernate3.32+Spri ... -
Error configuring application listener of class org.springframework.web.context.
2011-10-05 17:56 2728在整合Struts2+Hibernate.Spri ...
相关推荐
public void contextInitialized(ServletContextEvent sce) { log.info("web项目的启动{} 一开始就启动",sce.getServletContext()); System.err.println("web项目的启动{}"); } @Override public ...
import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import javax.servlet.http.HttpServlet; public class Test extends HttpServlet implements ServletContextListener {...
javax.servlet.ServletContextEvent.class javax.servlet.ServletContext.class javax.servlet.RequestDispatcher.class javax.servlet.Servlet.class javax.servlet.ServletException.class javax.servlet....
public void contextDestroyed(ServletContextEvent arg0) { // TODO Auto-generated method stub } public void contextInitialized(ServletContextEvent event) { Map map = new TreeMap(); Book b1 = ...
2 ServletContextEvent.getServletContext(); 3 HttpSession.getServletContext(); ------------------------------------------------ JSP Java Server Page java服务页面 更强大的Servlet Servlet升级 ...
ServletContextEvent ServletContextListener ServletException ServletInputStream ServletOutputStream ServletRequest ServletRequestAttributeEvent ServletRequestAttributeListener ...
javax.servlet.ServletContextEvent javax.servlet.ServletOutputStream javax.servlet.ServletRequestEvent javax.servlet.http.NoBodyResponse javax.servlet.UnavailableException javax.servlet....
contextInitialized(ServletContextEvent) - Method in interface javax.servlet.ServletContextListener Notification that the web application initialization process is starting. Cookie - class javax....