arthik babu wrote:
Hi,
How can I get the servlet name from the Http Request / Servlet conext?
Arthik
hi arthik...
hope you know about DD(deployment descriptor)..
here a servlet class is mapped to the url
pattern through a servlet name...
and i think there is no method in HttpRequest interface that will give you servlet name...
you also better check this
http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html"
and if you check ServletContext interface you will find
java.util.Enumeration getServletNames()
Deprecated. As of
Java Servlet API 2.1, with no replacement.
This method was originally defined to return an Enumeration of all the servlet names known to this context. In this version, this method always returns an empty Enumeration and remains only to preserve binary compatibility. This method will be permanently removed in a future version of the Java Servlet API.
java.util.Enumeration getServlets()
Deprecated. As of Java Servlet API 2.0, with no replacement.
This method was originally defined to return an Enumeration of all the servlets known to this servlet context. In this version, this method always returns an empty enumeration and remains only to preserve binary compatibility. This method will be permanently removed in a future version of the Java Servlet API.
or you find out
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html