Adobe 38000382 JRun Guide - Page 69

getConfiguration, information on using the JMCConfiguration object, see the JRun API Javadocs in

Page 69 highlights

Example The following example detects if the samples server exists and then lists any read-only files or directories in the samples directory: ...

  • 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
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116

JMC custom tags reference
55
Example
The following example detects if the samples server exists and then lists any read-only
files or directories in the samples directory:
...
<jmcmgmt:checkServer server="samples" directoryExistsId="exists"/>
<% if (exists.booleanValue()) %>
<% { %>
<jmcmgmt:checkServer server="samples" readOnlyFilesId="read_only_files"/>
<%= read_only_files %>
<% } %>
...
getConfiguration
Description
Retrieves an instance of the JMCConfiguration object and returns it as the variable
specified by the
id
parameter.
The JMCConfiguration object is in the jrunx.jmc.management package. For more
information on using the JMCConfiguration object, see the JRun API Javadocs in the
SDK. You can access the JMC Javadocs from the
sdk_root
/docs/jmc-javadocs directory.
Attributes
Example
The following example gets the JMCConfiguration object and executes the
getHosts
method on it:
...
<%@ page import="java.util.*"%>
...
<jmcmgmt:getConfiguration id="configuration"/>
<%
List validHosts = configuration.getHosts();
for (Iterator it = validHosts.iterator(); it.hasNext(); ) {
String validHost = (String) it.next();
out.println("validHost:" + validHost + "<BR>");
}
%>
...
Attribute
Description
id
(Required.) The variable name of the JMCConfiguration object.