40
|
1 local Luan = require "luan:Luan.luan"
|
|
2 local error = Luan.error
|
|
3 local pairs = Luan.pairs or error()
|
|
4 local Io = require "luan:Io.luan"
|
|
5 local Http = require "luan:http/Http.luan"
|
|
6 local Shared = require "site:/lib/Shared.luan"
|
|
7 local head = Shared.head or error()
|
|
8 local header = Shared.header or error()
|
|
9
|
|
10
|
|
11 local content = {
|
|
12 intro = {
|
45
|
13 title = [[Introduction]]
|
40
|
14 content = function()
|
|
15 %>
|
87
|
16 <p><a href="https://beanshell.github.io/">BeanShell</a> is a <a href="https://en.wikipedia.org/wiki/Scripting_language">scripting language</a> based on Java which looks a lot like Java. It is much friendlier for beginners than Java is. If you learn BeanShell then learning Java will be much easier.</p>
|
40
|
17 <%
|
|
18 end
|
|
19 }
|
45
|
20 access = {
|
87
|
21 title = [[Running BeanShell]]
|
40
|
22 content = function()
|
|
23 %>
|
87
|
24 <p><a href="https://beanshell.github.io/download.html">Download bsh-xx.jar</a> and put it in your working directory.</p>
|
|
25
|
|
26 <code block>
|
|
27 ~/beanshell $ ls -F
|
88
|
28 bsh-2.0b4.jar bsh_console.sh*
|
|
29 ~/beanshell $ cat bsh_console.sh
|
87
|
30 #!/bin/bash
|
|
31
|
|
32 export CLASSPATH=bsh-2.0b4.jar
|
|
33 java bsh.Console &
|
|
34 ~/beanshell $
|
|
35 </code>
|
|
36
|
88
|
37 <p>Copy my <code>bsh_console.sh</code> into your working directory. A <code>jar</code> file contains compiled Java code. The <code>CLASSPATH</code> tells the <code>java</code> command where to find compiled Java code.</p>
|
87
|
38
|
|
39 <p>Now you can run BeanShell:</p>
|
|
40
|
|
41 <code block>
|
88
|
42 ~/beanshell $ ./bsh_console.sh
|
87
|
43 ~/beanshell $
|
|
44 </code>
|
|
45
|
|
46 <p>You should see a new window that lets you interact with BeanShell. From now on I will mostly refer interactions in that window.</p>
|
|
47
|
40
|
48 <%
|
|
49 end
|
|
50 }
|
45
|
51 start = {
|
|
52 title = [[Getting Started]]
|
41
|
53 content = function()
|
|
54 %>
|
87
|
55 <p>From the window:</p>
|
46
|
56
|
|
57 <code block>
|
87
|
58 bsh % pwd();
|
|
59 /Users/fschmidt/beanshell
|
|
60 bsh % print("Hello world!");
|
|
61 Hello world!
|
|
62 bsh % print(1+1);
|
|
63 2
|
|
64 bsh %
|
46
|
65 </code>
|
|
66
|
87
|
67 <p>The BeanShell <code>pwd</code> command is like the Bash <code>pwd</code> command, and the BeanShell <code>print</code> command is somewhat like the Bash <code>echo</code> command. But the syntax is different. BeanShell and Java have syntax like most programming languages. While Bash does <code>command arg1 arg2 arg3</code>, most programming languages do <code>command(arg1,arg2,arg3)</code>. In addition, Java requires a <code>;</code> at the end of a statement (command line).</p>
|
46
|
68
|
89
|
69 <p><code>pwd</code> and <code>print</code> are only BeanShell commands. They are not in Java.</p>
|
|
70
|
87
|
71 <p>Also note that Java has the standard arithmetic operators.</p>
|
46
|
72
|
|
73 <%
|
|
74 end
|
|
75 }
|
|
76 vars = {
|
|
77 title = [[Variables]]
|
|
78 content = function()
|
|
79 %>
|
|
80
|
|
81 <code block>
|
87
|
82 bsh % String message = "Hello world!";
|
|
83 bsh % print(message);
|
|
84 Hello world!
|
|
85 bsh % int i = 2;
|
|
86 bsh % print(i);
|
|
87 2
|
|
88 bsh % print(i+1);
|
|
89 3
|
|
90 bsh % i = i + 5;
|
|
91 bsh % print(i);
|
|
92 7
|
|
93 bsh %
|
47
|
94 </code>
|
|
95
|
87
|
96 <p>Variables hold values. In Java (but not BeanShell), variables must be declared with a type. The type <code>String</code> is for text, and <code>int</code> is for integers.</p>
|
47
|
97
|
87
|
98 <p>The <code>=</code> command assigns a value to a variable.</p>
|
47
|
99
|
|
100 <%
|
|
101 end
|
|
102 }
|
87
|
103 objects = {
|
|
104 title = [[Objects and Strings]]
|
49
|
105 content = function()
|
|
106 %>
|
|
107
|
|
108 <code block>
|
87
|
109 bsh % print( message.toUpperCase() );
|
|
110 HELLO WORLD!
|
|
111 bsh % print( message.length() );
|
|
112 12
|
|
113 bsh % print( message.getClass() );
|
|
114 class java.lang.String
|
|
115 bsh %
|
49
|
116 </code>
|
|
117
|
88
|
118 <p>Java is an object-oriented language which means that it mostly deals with objects. I will explain with real-world examples. To show a dog or a toaster, I would do something like <code>show(dog)</code> or <code>show(toaster)</code>. Showing is something I do to these objects, it is not built into the objects. In contrast, to have a dog run I would do <code>dog.run()</code>, and to have a toaster toast bread I would do <code>toaster.toast(bread)</code>. Running is a function built into dogs, while toasting is built into toasters. Functions that are built into objects are called "member functions".</p>
|
49
|
119
|
87
|
120 <p>But actually this goes deeper. Dogs are a type of canine and all canines can run. So the ability of dogs to run actually comes from them being canines. In Java, we would call dogs, canines, and toasters "classes", and we would say that dogs are a subclass of canines, and that canines are a superclass of dogs.</p>
|
49
|
121
|
87
|
122 <p>Back to programming. The class of <code>message</code> (a String) is <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html">java.lang.String</a>. Click that link and see all the things that strings can do. For example, they can <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#toUpperCase--">toUpperCase</a> and <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#length--">length</a>. These functions return values. Strings can also <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--">getClass</a> but this functionality comes from the superclass <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html">java.lang.Object</a>. Objects are the base class of everything. Look again at the top of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html">java.lang.String</a> and you will see the class hierarchy and see that String is a subclass of Object.</p>
|
49
|
123
|
|
124 <%
|
|
125 end
|
|
126 }
|
87
|
127 interfaces = {
|
|
128 title = [[Interfaces and Lists]]
|
49
|
129 content = function()
|
|
130 %>
|
|
131
|
|
132 <code block>
|
87
|
133 bsh % List list = new ArrayList();
|
|
134 bsh % print( list );
|
|
135 []
|
|
136 bsh % print( list.size() );
|
|
137 0
|
|
138 bsh % list.add("a");
|
|
139 bsh % print( list );
|
|
140 [a]
|
|
141 bsh % print( list.size() );
|
|
142 1
|
|
143 bsh % list.add("b");
|
|
144 bsh % list.add("c");
|
|
145 bsh % print( list );
|
|
146 [a, b, c]
|
|
147 bsh % print( list.size() );
|
|
148 3
|
|
149 bsh % print( list.get(0) );
|
|
150 a
|
|
151 bsh % print( list.get(1) );
|
|
152 b
|
|
153 bsh % print( list.getClass() );
|
|
154 class java.util.ArrayList
|
|
155 bsh %
|
49
|
156 </code>
|
|
157
|
88
|
158 <p><a href="https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html">java.util.ArrayList</a> is a class. To make a new object of a class, we use the <code>new</code> operator. If you look at the top of the ArrayList page, you will see "All Implemented Interfaces:" which includes "List" and clicking that takes you to <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html">java.util.List</a>. List is an interface which you can think of as a purely abstract class. An interface only specifies what an object does, not how. A concrete class like ArrayList specifies how objects do what they do (the implementation) so that the object can actually do these actions. Note that an interface can be implemented/subclassed by multiple classes that implement the interface in different ways. You can see this in <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html">java.util.List</a> under "All Known Implementing Classes:".</p>
|
49
|
159
|
87
|
160 <p>Note that the first index of a list is 0 not 1. So the last index of a list is <code>list.size() - 1</code>.</p>
|
49
|
161
|
87
|
162 <p>Java organizes classes into packages. The package of List and ArrayList is <a href="https://docs.oracle.com/javase/8/docs/api/java/util/package-summary.html">java.util</a>. It is full of useful classes. Java has a huge number of standard classes, and I am not going to go over any more classes than needed to convey the core concepts of Java. You can learn the classes you need on your own.</p>
|
|
163
|
|
164
|
41
|
165 <%
|
|
166 end
|
|
167 }
|
88
|
168 boolean = {
|
|
169 title = [[Boolean Values and Equality]]
|
|
170 content = function()
|
|
171 %>
|
|
172
|
|
173 <code block>
|
|
174 bsh % print( 3 > 4 );
|
|
175 false
|
|
176 bsh % print( 3 >= 4 );
|
|
177 false
|
|
178 bsh % print( 3 < 4 );
|
|
179 true
|
|
180 bsh % print( 3 <= 4 );
|
|
181 true
|
|
182 bsh % print( 3 == 4 );
|
|
183 false
|
|
184 bsh % print( 3 != 4 );
|
|
185 true
|
|
186 bsh % print( 3 < 4 && 3 > 4 );
|
|
187 false
|
|
188 bsh % print( 3 < 4 || 3 > 4 );
|
|
189 true
|
|
190 bsh % boolean b = 3 < 4;
|
|
191 bsh % print(b);
|
|
192 true
|
|
193 bsh % print( b == true );
|
|
194 true
|
|
195 bsh %
|
|
196 </code>
|
|
197
|
|
198 <p><code>==</code> checks for equality, <code>!=</code> checks for inequality, <code>&&</code> is for "and", and <code>||</code> is for "or". These are boolean operators that return boolean values, unlike something like <code>+</code> which is an arithmetic operator. <code>boolean</code> is a type than can have the values <code>true</code> or <code>false</code>.</p>
|
|
199
|
|
200 <code block>
|
|
201 bsh % String s1 = new String("hi");
|
|
202 bsh % String s2 = new String("hi");
|
|
203 bsh % print( s1 == s2 );
|
|
204 false
|
|
205 bsh % print( s1.equals(s2) );
|
|
206 true
|
|
207 bsh % String s3 = s1;
|
|
208 bsh % print( s1 == s3 );
|
|
209 true
|
|
210 bsh %
|
|
211 </code>
|
|
212
|
|
213 <p>If you have two objects in the physical world that are identical, then they are not the same object but they are equivalent objects. In Java, <code>object1 == object2</code> checks whether object1 and object2 refer to the same object. Object variables refer to objects, they don't contain the object's value. <code>object1.equals(object2)</code> checks for object equivalence.</p>
|
|
214
|
|
215 <p>The types <code>int</code> and <code>boolean</code> are primitive types. They are not objects. Primitive type variables contain primitive values, so they don't refer to anything. So in this case, <code>==</code> checks for equal values.</p>
|
|
216
|
|
217 <%
|
|
218 end
|
|
219 }
|
|
220 file = {
|
|
221 title = [[Run File and Comment]]
|
|
222 content = function()
|
|
223 %>
|
|
224
|
|
225 <p>Now I will return to the Bash command line.</p>
|
|
226
|
|
227 <code block>
|
|
228 ~/beanshell $ ls -F
|
|
229 bsh-2.0b4.jar bsh.sh* bsh_console.sh* code.bsh
|
|
230 ~/beanshell $ cat bsh.sh
|
|
231 #!/bin/bash
|
|
232
|
|
233 export CLASSPATH=bsh-2.0b4.jar
|
|
234 java bsh.Interpreter $*
|
|
235 ~/beanshell $ cat code.bsh
|
|
236 /* This is a comment */
|
|
237 // This is also a comment
|
|
238
|
|
239 print("Hi");
|
|
240 print("Bye");
|
|
241
|
|
242 ~/beanshell $ ./bsh.sh code.bsh
|
|
243 Hi
|
|
244 Bye
|
|
245 ~/beanshell $
|
|
246 </code>
|
|
247
|
|
248 <p><code>bsh.sh</code> runs a BeanShell file from the command line. I will keep modifying <code>code.bsh</code> to show my examples.</p>
|
|
249
|
|
250 <p> In Java, comments are between <code>/*</code> and <code>*/</code> or between <code>//</code> and the end of the line. Comments are ignored.</p>
|
|
251 <%
|
|
252 end
|
|
253 }
|
|
254 ifs = {
|
|
255 title = [[If Statements]]
|
|
256 content = function()
|
|
257 %>
|
|
258
|
|
259 <code block>
|
|
260 ~/beanshell $ cat code.bsh
|
|
261 int x = 5;
|
|
262
|
|
263 print("first if");
|
|
264 if( x == 5 ) {
|
|
265 print("x == 5");
|
|
266 }
|
|
267
|
|
268 print("second if");
|
|
269 if( x > 5 ) {
|
|
270 print("x > 5");
|
|
271 } else {
|
|
272 print("x <= 5");
|
|
273 }
|
|
274
|
|
275 print("third if");
|
|
276 if( x > 5 ) {
|
|
277 print("x > 5");
|
|
278 } else if( x < 5 ) {
|
|
279 print("x < 5");
|
|
280 } else {
|
|
281 print("x == 5");
|
|
282 }
|
|
283
|
|
284 ~/beanshell $ ./bsh.sh code.bsh
|
|
285 first if
|
|
286 x == 5
|
|
287 second if
|
|
288 x <= 5
|
|
289 third if
|
|
290 x == 5
|
|
291 ~/beanshell $
|
|
292 </code>
|
|
293
|
|
294 <p><code>if</code> statements take a boolean argument.</p>
|
|
295
|
|
296 <%
|
|
297 end
|
|
298 }
|
|
299 loops = {
|
|
300 title = [[Loops]]
|
|
301 content = function()
|
|
302 %>
|
|
303
|
|
304 <code block>
|
|
305 ~/beanshell $ cat code.bsh
|
|
306 ~/beanshell $ cat code.bsh
|
|
307 print("first loop");
|
|
308 int i = 1;
|
|
309 while( i <= 3 ) {
|
|
310 print(i);
|
|
311 i = i + 1;
|
|
312 }
|
|
313
|
|
314 print("second loop");
|
|
315 for( int i = 1; i <= 3; i = i + 1 ) {
|
|
316 print(i);
|
|
317 }
|
|
318
|
|
319 List list = new ArrayList();
|
|
320 list.add("a");
|
|
321 list.add("b");
|
|
322 list.add("c");
|
|
323
|
|
324 print("third loop");
|
|
325 for( int i = 0; i < list.size(); i = i + 1 ) {
|
|
326 String s = list.get(i);
|
|
327 print(s);
|
|
328 }
|
|
329
|
|
330 print("fourth loop");
|
|
331 Iterator iter = list.iterator();
|
|
332 while( iter.hasNext() ) {
|
|
333 String s = iter.next();
|
|
334 print(s);
|
|
335 }
|
|
336
|
|
337 print("fifth loop");
|
|
338 for( String s : list ) {
|
|
339 print(s);
|
|
340 }
|
|
341
|
|
342 ~/beanshell $ ./bsh.sh code.bsh
|
|
343 first loop
|
|
344 1
|
|
345 2
|
|
346 3
|
|
347 second loop
|
|
348 1
|
|
349 2
|
|
350 3
|
|
351 third loop
|
|
352 a
|
|
353 b
|
|
354 c
|
|
355 fourth loop
|
|
356 a
|
|
357 b
|
|
358 c
|
|
359 fifth loop
|
|
360 a
|
|
361 b
|
|
362 c
|
|
363 ~/beanshell $
|
|
364 </code>
|
|
365
|
|
366 <p>The first form of the <code>for</code> loop has three elements: an initialization statement, a loop condition, and a statement that is run after each iteration of the loop. The second form of the <code>for</code> loop iterates through anything that is iterable, returning values in sequence. For the fourth loop, see <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html#iterator--">List.iterator()</a>.</p>
|
|
367
|
|
368 <%
|
|
369 end
|
|
370 }
|
|
371 blocks = {
|
|
372 title = [[Blocks]]
|
|
373 content = function()
|
|
374 %>
|
|
375
|
|
376 <code block>
|
|
377 ~/beanshell $ cat code.bsh
|
|
378 {
|
|
379 String s = "ok";
|
|
380 print( "first " + s );
|
|
381 }
|
|
382 print( "second " + s );
|
|
383
|
|
384 ~/beanshell $ ./bsh.sh code.bsh
|
|
385 first ok
|
|
386 second void
|
|
387 ~/beanshell $
|
|
388 </code>
|
|
389
|
|
390 <p>Code between the braces <code>{</code> and <code>}</code> is a block. When braces are part of a statement like a <code>for</code> statement, the block extends to include the whole statement. Variables declared inside a block only exist within that block.</p>
|
|
391
|
|
392 <p>In BeanShell an undefined variable is <code>void</code> but in Java you would get a compile error.</p>
|
|
393
|
|
394 <p>Note that besides being an arithmetic operator, <code>+</code> also concatenates strings.</p>
|
|
395 <%
|
|
396 end
|
|
397 }
|
|
398 arrays = {
|
|
399 title = [[Arrays and null]]
|
|
400 content = function()
|
|
401 %>
|
|
402 <code block>
|
|
403 ~/beanshell $ cat code.bsh
|
|
404 String[] array = { "a", "b", "c", "d", "e" };
|
|
405 print( "array = " + Arrays.asList(array) );
|
|
406 print( "length = " + array.length );
|
|
407 print( "array[1] = " + array[1] );
|
|
408 array[1] = "bb";
|
|
409 print( "modified array = " + Arrays.asList(array) );
|
|
410 print("loop");
|
|
411 for( String s : array ) {
|
|
412 print(s);
|
|
413 }
|
|
414
|
|
415 array = new String[3];
|
|
416 print( "new array = " + Arrays.asList(array) );
|
|
417 array[2] = "two";
|
|
418 print( "modified new array = " + Arrays.asList(array) );
|
|
419
|
|
420 ~/beanshell $ ./bsh.sh code.bsh
|
|
421 array = [a, b, c, d, e]
|
|
422 length = 5
|
|
423 array[1] = b
|
|
424 modified array = [a, bb, c, d, e]
|
|
425 loop
|
|
426 a
|
|
427 bb
|
|
428 c
|
|
429 d
|
|
430 e
|
|
431 new array = [null, null, null]
|
|
432 modified new array = [null, null, two]
|
|
433 ~/beanshell $
|
|
434 </code>
|
|
435
|
|
436 <p>Arrays are an anomaly - neither primitive type nor object. Arrays don't do anything that lists can't do. The reason that Java has arrays is because arrays are a fundamental low-level programming concept, and Java is a low-level language.</p>
|
|
437
|
|
438 <p>Arrays are declared with the type that they will hold, and then they can only hold that type. Arrays cannot change size.</p>
|
|
439
|
|
440 <p>Since arrays don't know how become strings, I used <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#asList-T...-">Arrays.asList()</a> which converts an array into a list so that it can be displayed properly. Note that this is a <code>static</code> function which means that it isn't part of an object, but rather is a general function that is associated with a class.</p>
|
|
441
|
|
442 <p>In the second part of the code, I assign <code>array</code> to a new array of length 3 with no values. Java uses the special value <code>null</code> to mean no value.</p>
|
|
443 <%
|
|
444 end
|
|
445 }
|
|
446 fns = {
|
|
447 title = [[Functions]]
|
|
448 content = function()
|
|
449 %>
|
|
450 <code block>
|
|
451 ~/beanshell $ cat code.bsh
|
|
452 int add(int x,int y) {
|
|
453 return x + y;
|
|
454 }
|
|
455
|
|
456 void addAndShow(int x,int y) {
|
|
457 int sum = x + y;
|
|
458 print( x + " + " + y + " = " + sum );
|
|
459 }
|
|
460
|
|
461 void sayBye() {
|
|
462 print("Bye");
|
|
463 }
|
|
464
|
|
465 print( "add(2,3) = " + add(2,3) );
|
|
466 addAndShow(2,3);
|
|
467 sayBye();
|
|
468
|
|
469 ~/beanshell $ ./bsh.sh code.bsh
|
|
470 add(2,3) = 5
|
|
471 2 + 3 = 5
|
|
472 Bye
|
|
473 ~/beanshell $
|
|
474 </code>
|
|
475
|
|
476 <p>Functions make possible reusable code, and are the core concept of programming. In Java, function definitions start with the return type, then the function name, then the function parameters with types, and then a block that implements the function. A return type of <code>void</code> means nothing is returned.</p>
|
|
477 <%
|
|
478 end
|
|
479 }
|
|
480 impl = {
|
|
481 title = [[Implementing Interfaces]]
|
|
482 content = function()
|
|
483 %>
|
|
484 <code block>
|
|
485 ~/beanshell $ cat code.bsh
|
|
486 Iterator iter = new Iterator() {
|
|
487 int i = 0;
|
|
488 boolean hasNext() {
|
|
489 return i < 10;
|
|
490 }
|
|
491 int next() {
|
|
492 i = i + 1;
|
|
493 return i;
|
|
494 }
|
|
495 };
|
|
496
|
|
497 while( iter.hasNext() ) {
|
|
498 print( iter.next() );
|
|
499 }
|
|
500
|
|
501 ~/beanshell $ ./bsh.sh code.bsh
|
|
502 1
|
|
503 2
|
|
504 3
|
|
505 4
|
|
506 5
|
|
507 6
|
|
508 7
|
|
509 8
|
|
510 9
|
|
511 10
|
|
512 ~/beanshell $
|
|
513 </code>
|
|
514
|
|
515 <p>BeanShell doesn't let you implement new classes, you must use Java for that. But BeanShell does let you implement interfaces which is similar to implementing a new class. In this case, I implement <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html">Iterator</a> which defines two member functions which must be implemented. Typically an implementation will include both member functions and member data/variables. The member data describes the state of the object, and the member functions often modify that state. This iterator counts from 1 to 10, and the member variable <code>i</code> keeps track of the current count.</p>
|
|
516
|
|
517 <p>This example is just to give a taste of object-oriented programming. When you learn Java, you will learn much more about this.</p>
|
|
518 <%
|
|
519 end
|
|
520 }
|
|
521 conclusion = {
|
|
522 title = [[Conclusion]]
|
|
523 content = function()
|
|
524 %>
|
|
525 <p>The purpose of this tutorial is to introduce basic Java concepts that will make learning Java easier. I avoided details and involved examples.</p>
|
|
526
|
|
527 <p>When you are learning Java, I still think BeanShell is a useful tool for experimentation. You can quickly test things in BeanShell that would take longer to test in Java.</p>
|
|
528 <%
|
|
529 end
|
|
530 }
|
40
|
531 }
|
|
532
|
|
533
|
|
534 local function show_toc(content)
|
|
535 %>
|
|
536 <ul>
|
|
537 <%
|
|
538 for id, info in pairs(content) do
|
|
539 %>
|
|
540 <li><a id="c_<%=id%>" href="#<%=id%>"><%=info.title%></a></li>
|
|
541 <%
|
|
542 end
|
|
543 %>
|
|
544 </ul>
|
|
545 <%
|
|
546 end
|
|
547
|
|
548 local function show_content(content,h)
|
|
549 for id, info in pairs(content) do
|
|
550 %>
|
|
551 <div heading>
|
|
552 <h<%=h%>><a id="<%=id%>" href="#<%=id%>"><%=info.title%></a></h<%=h%>>
|
|
553 <a href="#c_<%=id%>">contents</a>
|
|
554 </div>
|
|
555 <%
|
|
556 info.content()
|
|
557 end
|
|
558 end
|
|
559
|
|
560 return function()
|
|
561 Io.stdout = Http.response.text_writer()
|
|
562 %>
|
|
563 <!doctype html>
|
|
564 <html>
|
|
565 <head>
|
|
566 <% head() %>
|
87
|
567 <title>Reactionary BeanShell Tutorial</title>
|
40
|
568 </head>
|
|
569 <body>
|
|
570 <% header() %>
|
|
571 <div content>
|
87
|
572 <h1><a href="beanshell.html">Reactionary BeanShell Tutorial</a></h1>
|
40
|
573 <hr>
|
|
574 <h2>Contents</h2>
|
|
575 <div toc>
|
|
576 <% show_toc(content) %>
|
|
577 </div>
|
|
578 <hr>
|
|
579 <% show_content(content,2) %>
|
|
580 </div>
|
|
581 </body>
|
|
582 </html>
|
|
583 <%
|
|
584 end
|