Prathap
Prathap

Reputation: 85

How to find a included JSP name from a section of a jsp page

It is common for all of us to have a JSP page which includes several other jsp pages to display the page.

Is there any tool or plugin to find out the included jsp file name from the displayed page?.

Upvotes: 0

Views: 126

Answers (2)

Santhosh
Santhosh

Reputation: 8217

Is there any tool or plugin to find out the included jsp file name from the displayed page?

No u cant view the JSP tags in the browser , as they are compiled in the server

Upvotes: 1

jmail
jmail

Reputation: 6132

you should use this method:

    <%
       ...
    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
    ...
    %>

Upvotes: 1

Related Questions