Created
July 28, 2021 17:26
-
-
Save rossbu/0ceaed94dd3dda635b540fd54bd434b4 to your computer and use it in GitHub Desktop.
print out system , server and application info in jsp
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
<%@ | |
page contentType="text/html;charset=UTF-8" language="java" | |
%> | |
<%@ page import="java.util.*" %> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
Server info: <%= application.getServerInfo() %><br> | |
Servlet version: <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %><br> | |
JSP version: <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %><br> | |
Java version: <%= System.getProperty("java.version") %><br> | |
<% | |
Properties p = System.getProperties(); | |
Enumeration keys = p.keys(); | |
while (keys.hasMoreElements()) { | |
String key = (String)keys.nextElement(); | |
String value = (String)p.get(key); | |
%> | |
<%=key%> : <%=value%><br> | |
<%}%> | |
</body></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment