import dk.brics.jwig.runtime.*;
public class Hello extends Service {
private static final XML wrap = [[
<html>
<head>
<title>A JWIG example</title>
</head>
<body>
<[body]>
</body>
</html>
]];
private static final XML question = [[
<form>
What is your name?
<input type="text" name="person" />
<br/>
<input type="submit" name="answer" value="Answer" />
</form>
]];
private static final XML greeting = [[
<h1>Hello <[who]>!</h1>
]];
public class Test extends Session {
public void main() {
show wrap <[body = question];
exit wrap <[body = greeting <[who = receive person]];
}
}
}
|