Home  |   STIU  |   WOW  |   SCJP  |   SCDJWS   |   JEE FAQ  |   About US  |  

FAQ
  Java FAQ
  JSP FAQ
  Servlet FAQ
 

Advertisement

XyzWs JSP FAQ:
How to get the current JSP page 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
Advertisement
XyzWs JSP FAQ: How to get the current JSP page name?

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

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

Support  | Feedback  | Help