request 的常用方法

  • request.getSchema()
    返回当前页面使用的协议,http 或是 https;
  • request.getServerName()
    返回当前页面所在的服务器的名字;
  • request.getServerPort()
    返回当前页面所在的服务器使用的端口,就是80;
  • request.getContextPath()
    返回当前页面所在的应用的名字;

jQuery

  • 获取当前根目录
${pageContext.request.contextPath}

${ctx}
<!-- 简写形式 -->

el

${pageContext.request.contextPath}

相关文章:

  • 2022-02-20
  • 2021-10-21
  • 2021-05-25
  • 2022-01-16
  • 2021-06-16
  • 2022-01-11
猜你喜欢
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
  • 2021-10-12
  • 2021-12-24
  • 2021-12-09
相关资源
相似解决方案