File: issue89174.jsp

package info (click to toggle)
netbeans 8.1%2Bdfsg3-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 816,472 kB
  • ctags: 847,258
  • sloc: java: 5,564,229; xml: 634,273; cpp: 25,695; ansic: 20,104; jsp: 12,621; sh: 10,354; php: 4,204; makefile: 1,456; fortran: 1,200; sql: 1,192; objc: 288; perl: 277; haskell: 120; yacc: 30; awk: 17; lex: 11; asm: 4
file content (89 lines) | stat: -rw-r--r-- 2,060 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<%@page contentType="text/html"%>
<%@page import="java.util.Properties, java.util.Enumeration" pageEncoding="UTF-8"%>

<%--

siteInfo.jsp

Created on 09 November 2006

$Id$

--%>

<%
String error = null;
Properties systemProperties = null;
Enumeration systemPropertiesEnum = null;
Enumeration servletInitParametersEnum = null;

ServletContext sc = getServletContext ();

ServletConfig scg = getServletConfig ();

servletInitParametersEnum = scg.getInitParameterNames ();

String serverInfo = sc.getServerInfo ();
int majorApiVersion = sc.getMajorVersion ();
int minorApiVersion = sc.getMinorVersion ();

try {
systemProperties = System.getProperties ();
systemPropertiesEnum = (Enumeration) systemProperties.propertyNames ();
} catch (Exception e){
error = e.getMessage ();
}
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Java Site Information</title>
</head>
<body>

<h1>Java Site Information</h1>

<div>

<%
out.println ("The system container is " + serverInfo + "<br />");
out.println ("<hr />");

if (servletInitParametersEnum != null){
out.println ("<p>The Servlet initialization parameters are: </p>");

out.println ("<table>");
while(servletInitParametersEnum.hasMoreElements ()){
String prop = servletInitParametersEnum.nextElement ().toString ();
out.print ("<tr><td><b>" + prop + "</b>" + "</td>");
out.println ("<td>" + scg.getInitParameter (prop) + "</td></tr>");
}
out.println ("</table>");
}else {
out.println("No Servlet Init Parameters Available.<br />");
}

out.println ("<hr />");
out.println ("<table>");

if (error == null){
while (systemPropertiesEnum.hasMoreElements ()){
String prop = systemPropertiesEnum.nextElement ().toString ();
out.print ("<tr><td><b>" + prop + "</b>" + "</td>");
out.println ("<td>" + systemProperties.getProperty (prop) + "</td></tr>");
} // end while
} // end if
else {
out.println ("An exception was thrown: <b>" + error + "</b>");
}
%>
</div>


</body>
</html>