Last active
August 7, 2017 00:41
-
-
Save jyeary/45c2213136884e42bb7748d4a12294d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Substitute your target web application below. | |
ServletContext sc = request.getServletContext().getContext("/EnterpriseApplication1-war"); | |
//An example of what you can see to prove a point | |
Map<String, ? extends ServletRegistration> map = sc.getServletRegistrations(); | |
for (String key : map.keySet()) { | |
sc.log("Registration " + map.get(key).getName()); | |
Map<String, String> params = sc.getServletRegistration(map.get(key).getName()).getInitParameters(); | |
for (String k : params.keySet()) { | |
sc.log("\t" + k + " --> " + params.get(k)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment