[[ import se.rupy.http.*;
import se.rupy.http.Async.Work;
import java.io.*;
import java.sql.*;
import org.json.*;
import java.util.Date;
import java.nio.file.Files;
import java.nio.file.Paths;
public class test extends Service implements Daemon.JVMListener {
String[] description = new String[] {"Insert to database", "Exception", "Write file outside sandbox", "Read file outside sandbox", "Write file inside sandbox", "Link outside sandbox", "Link inside sandbox", "Write host header", "Add as controller", "Get hosts"};
public void create(Daemon daemon) throws Exception {
try {
Class.forName("com.mysql.jdbc.Driver");
}
catch(Exception e) {
// Mysql driver not available on local
}
}
public Object receive(Event event, Object message) throws Exception { return null; }
public String path() { return "/"; }
public void filter(Event event) throws Event, Exception {
event.query().parse();
Output out = event.output();
String name = "test";
// This is entered if the /user filter chain fetches
// the salt async. so then we call /user again to write
// the login form and write the bottom of the page.
if(event.push()) {
event.daemon().chain(event, "/user").filter(event);
out.println("
");
for(int i = 0; i < description.length; i++) { ]]