we have to use relative path i.e "/contextpath" when using other application context path name inside getContext method as per the specification.
so change will be like ServletContext ctx2=ctx1.getContext("/Best"); and to enable this feature little change needed in server.xml
we need to add this attribute crossContext="true" in project's context element in server.xml.
We noticed he had no friends. So we gave him this tiny ad:
a bit of art, as a gift, that will fit in a stocking