How can I find out a servlet's URL?
Posted
by Geo
on Stack Overflow
See other posts from Stack Overflow
or by Geo
Published on 2010-06-02T15:44:06Z
Indexed on
2010/06/02
15:54 UTC
Read the original article
Hit count: 194
Let's say I have this in my web.xml:
<servlet>
<description></description>
<display-name>MainServ</display-name>
<servlet-name>MainServ</servlet-name>
<servlet-class>MainServ</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MainServ</servlet-name>
<url-pattern>/MainServ</url-pattern>
</servlet-mapping>
Imagine I'm in that servlet's doGet
method. Is there anyway of getting at the /MainServ
value?
© Stack Overflow or respective owner