FAQ


Advertisement



How to get the current JSP page name?

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


Printer-friendly version Printer-friendly version | Send this 
article to a friend Mail this to a friend

Previous Next vertical dots separating previous/next from contents/index/pdf Contents

  |   |