• JSP Request.getPathTranslated()方法:获取URL的路径信息

    该方法返回 URL 中在 servlet 名称之后,在检索字符串之前的路径信息。

    语法:

    getPathTranslated()

    返回值:URL 的路径信息,如果没有信息则返回 null。

    示例

    在页面中输出URL路径信息,关键代码如下:

    <%
      out.println(request.getPathTranslated());
    %>

更多...

加载中...