stevel 01/12/26 12:37:10
Modified: docs/manual/OptionalTasks telnet.html
Log:
add detail on the nested elements; wrapping a few lines in the process.
Revision Changes Path
1.4 +35 -6 jakarta-ant/docs/manual/OptionalTasks/telnet.html
Index: telnet.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/OptionalTasks/telnet.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- telnet.html 2001/10/30 10:05:38 1.3
+++ telnet.html 2001/12/26 20:37:10 1.4
@@ -2,16 +2,19 @@
<head>
<meta http-equiv="Content-Language" content="en-us">
-<title>Apache Ant User Manual</title>
+<title>Telnet</title>
</head>
<body>
<h2><a name="telnet">Telnet</a></h2>
<h3>Description</h3>
-Task to automate a remote telnet session. The task uses nested <read>
to indicate strings to wait for, and <write> tags to specify text to
send.
+Task to automate a remote telnet session. The task uses
+nested <read> to indicate strings to wait for, and
+<write> tags to specify text to send.
-<p>If you do specify a userid and password, the system will assume a common
unix prompt to wait on. This behavior can be easily over-ridden.</p>
+<p>If you do specify a userid and password, the system will
+assume a common unix prompt to wait on. This behavior can be easily
over-ridden.</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
@@ -22,12 +25,12 @@
<tr>
<td>userid</td>
<td>the login id to use on the telnet server.</td>
- <td>No</td>
+ <td>Only if password is specified</td>
</tr>
<tr>
<td>password</td>
<td>the login password to use on the telnet server.</td>
- <td>No</td>
+ <td>Only if userid is specified</td>
</tr>
<tr>
<td>server</td>
@@ -50,8 +53,34 @@
<td>No</td>
</tr>
</table>
+<h3><a name="nested">Nested Elements</a></h3>
+The commands to send to the server, and responses to wait for, are
+described as nested elements.
+
+<h4>read</h4>
+
+<p>declare (as a text child of this element) a string to wait for.
+The element supports the timeout attribute, which overrides any
+timeout specified for the task as a whole. It also has a <tt>string<tt>
+attribute, which is an alternative to specifying the string as
+a text element.
+</p>
+<i>Always declare an opening and closing
+<read> element to ensure that statements are not sent before
+the connection is ready, and that the connection is not broken before
+the final command has completed.
+</i>
+<h4>write</h4>
+
+<p>describes the text to send to the server. The <tt>echo</tt> boolean
+attribute controls whether the string is echoed to the local log;
+this is "true" by default
+</p>
<h3>Examples</h3>
-A simple example of connecting to a server and running a command. This
assumes a prompt of "ogin:" for the userid, and a prompt of
"assword:" for the password.
+A simple example of connecting to a server and running a command. This
assumes
+ a prompt of "ogin:" for the userid, and a prompt of
"assword:"
+ for the password.
+
<blockquote><pre>
<telnet userid="bob" password="badpass"
server="localhost">
<read>/home/bob</read>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>