如何从JSP页面的一部分中查找包含的JSP名称

如何从JSP页面的一部分中查找包含的JSP名称,jsp,Jsp,我们大家都有一个JSP页面,其中包含几个其他JSP页面来显示该页面 是否有任何工具或插件可以从显示的页面中找到包含的jsp文件名?您应该使用以下方法: 没有您不能在浏览器中查看JSP标记,因为它们是在服务器中编译的 <% ... getServletConfig().getServletContext().getRealPath(request.getServletPath()); //returns file name and pat

我们大家都有一个JSP页面,其中包含几个其他JSP页面来显示该页面

是否有任何工具或插件可以从显示的页面中找到包含的jsp文件名?

您应该使用以下方法:






没有您不能在浏览器中查看
JSP
标记,因为它们是在服务器中编译的

    <%
       ...
    getServletConfig().getServletContext().getRealPath(request.getServletPath());
    //returns file name and path
       ...
    %>
    <%
    ...
    application.getRealPath(request.getServletPath()); 
    //returns file name and path
    ...
    %>
    <%
    ...
    this.getClass().getName(); 
    //returns the class name
    ...
    %>
Is there any tool or plugin to find out the included jsp file name from the displayed page?