Adobe 38000382 JRun Guide - Page 80

status, The following example gets the status of the default and samples servers and prints

Page 80 highlights

... status Description Indicates whether the specified server is running. Returns true if the specified server is running, or false if it is not, and conditionally executes the body of the tag. Attributes Attribute server availableId available Description (Required.) The name of the server. Set this attribute to store the return value of the status tag. Set to true to execute if the server is running. Set to false to determine if the server is not running. If the return value is true, JRun executes the body of the tag. Example 1 The following example gets the status of the default and samples servers and prints the results to the body of the page: ... Status of default server: Status of samples server: ... Example 2 The following example executes the body of the status tag if the default server is running: ... Status of the default server: ... 66 Chapter 6 Using the JMC Custom Tag Library

  • 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

66
Chapter 6
Using the JMC Custom Tag Library
<INPUT TYPE="Submit" VALUE="Submit"></FORM>
...
status
Description
Indicates whether the specified server is running. Returns true if the specified server is
running, or false if it is not, and conditionally executes the body of the tag.
Attributes
Example 1
The following example gets the status of the default and samples servers and prints the
results to the body of the page:
...
<jmcmgmt:status server="default" availableId="stat1" />
<jmcmgmt:status server="samples" availableId="stat2" />
Status of default server: <%= stat1 %><BR>
Status of samples server: <%= stat2 %>
...
Example 2
The following example executes the body of the status tag if the default server is running:
...
<% boolean running = false; %>
<jmcmgmt:status server="default" available="true">
<% running = true; %>
</jmcmgmt:status>
<BR>Status of the default server: <%= running %>
...
Attribute
Description
server
(Required.) The name of the server.
availableId
Set this attribute to store the return value of the status tag.
available
Set to true to execute if the server is running. Set to false to determine if the
server is not running. If the return value is true, JRun executes the body of the
tag.