how to get the filename of the active jsp page?

how can i get the filename of the active jsp page?
[57 byte] By [hardcodera] at [2007-11-27 1:38:11]
# 1
Check the HttpServletRequest API. It provides some useful methods to get details about the current request.
BalusCa at 2007-7-12 0:49:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

You could register the JSP [ages in the web.xml and then use the ServletConfig.getServletName.

You could use the JspContex.getServletName which will return the registered name or the name of the servlet class.

You could programmatically add a page context attribute that holds the jsp page name

tolmanka at 2007-7-12 0:49:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
thanks! what i did was the request.getRequestURI(). it worked great!
hardcodera at 2007-7-12 0:49:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...