备忘,一段代码:

@Override
public void init(FilterConfig arg0) throws ServletException {
// TODO Auto-generated method stub
logger.info("======begin web context====");
ServletContext context=arg0.getServletContext();
String webroot=context.getContextPath()+"/WebContent/";
context.setAttribute("webroot", webroot);
logger.info("webroot:"+webroot); }

在过滤器中获取的servletcontext。

最新文章

  1. 深入理解ConcurrentMap.putIfAbsent(key,value) 用法
  2. Bootstrap学习笔记系列2-------Bootstrap简单表格处理
  3. 编译mahout0.9
  4. (转)linux中fork()函数详解
  5. MongoDB - The mongo Shell, mongo Shell Quick Reference
  6. UITableViewCell实现3D缩放动画
  7. Linux命令:TOP
  8. 调试minix内核
  9. SQL Server 日志传送[转载]
  10. 对HI3531的GPIO使用的再分析
  11. C++内存分区
  12. 痞子衡嵌入式:ARM Cortex-M文件那些事(1)- 源文件(.c/.h/.s)
  13. SSM(Spring+springMVC+MyBatis)框架-springMVC实现图片上传
  14. vue循環語句
  15. 点击图片弹出input type=file选择器
  16. DotNetBar 中Ribbon汉化
  17. 关于urls 的基础
  18. 【java】之Method和Field反射获取和设置属性值
  19. asp.net core 使用identityServer4的密码模式来进行身份认证(2) 认证授权原理
  20. 分布式为什么使用Redis

热门文章

  1. POJ 2395 Out of Hay(求最小生成树的最长边+kruskal)
  2. JavaScript(一) - 精简
  3. 熟练使用Linux进程管理类命令
  4. 使用Fiddler实现网络限速
  5. Python2操作中文名文件乱码解决方案
  6. cesium初始化参数
  7. 20165233 Java第二、三章学习总结
  8. leetcode400
  9. 重新设定McAfee Agent的菜单语言
  10. 解决opencv3运行opencv2代码时报错的修改备忘录