blob: b5e2abc36e82ddca1d65d818873e634989d701d9 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<j:jelly xmlns:j="jelly:core" xmlns:interaction="jelly:interaction">
<!-- some sample scripts would be a good idea -->
<j:new className="java.util.LinkedList" var="x"/>
<j:mute>${x.add('Newton')}${x.add('Galileo')}${x.add('Faraday')}
${x.add('Pascal')}${x.add('Einstein')}</j:mute>
<j:while test='${true}'>
<interaction:ask question="Name a physicist born before the 20th century : " answer="answer"
completor="${x}"/>
Your answer was: ${answer}
<j:choose>
<j:when test="${x.contains(answer)}">Congratulations!
<j:break/></j:when>
<j:otherwise>- I don't know a physicist by the name of ${answer}, please try again.
</j:otherwise>
</j:choose>
</j:while>
</j:jelly>