writer.println ("file=\""+propsFile.getCanonicalPath() +"\";");
writer.println ("file=\""+propsFile.getCanonicalPath().replace('\\','/') +"\";");
    public void setUp ()    throws Exception    {        if (setupDone)            return;                        //set up the properties         File propsFile = File.createTempFile("props", null);        propsFile.deleteOnExit();        Properties props = new Properties ();        props.put("user", "user,user,pleb");        FileOutputStream fout=new FileOutputStream(propsFile);        props.store(fout, "");        fout.close();                         //set up config        File configFile = File.createTempFile ("loginConf", null);        configFile.deleteOnExit();        PrintWriter writer = new PrintWriter(new FileWriter(configFile));        writer.println ("props {");        writer.println ("org.mortbay.jetty.plus.jaas.spi.PropertyFileLoginModule required");             writer.println ("debug=\"true\"");        writer.println ("file=\""+propsFile.getCanonicalPath() +"\";");        writer.println ("};");        writer.println ("ds {");        writer.println ("org.mortbay.jetty.plus.jaas.spi.DataSourceLoginModule required");        writer.println ("debug=\"true\"");        writer.println ("dbJNDIName=\"ds\"");        writer.println ("userTable=\"myusers\"");        writer.println ("userField=\"myuser\"");        writer.println ("credentialField=\"mypassword\"");        writer.println ("userRoleTable=\"myuserroles\"");        writer.println ("userRoleUserField=\"myuser\"");        writer.println ("userRoleRoleField=\"myrole\";");        writer.println ("};");        writer.flush();        writer.close();                BufferedReader reader = new BufferedReader(new FileReader(configFile));        String s = "";        for (s = reader.readLine(); (s != null); s = reader.readLine())        {            System.out.println (s);        }                //create a login module config file        System.setProperty ("java.security.auth.login.config", configFile.toURL().toExternalForm());        setupDone = true;    }