1 package org.objectweb.celtix.systest.js; 2 3 import java.io.File ; 4 5 import org.objectweb.celtix.js.rhino.ProviderFactory; 6 7 import org.objectweb.celtix.systest.common.TestServerBase; 8 9 public class Server extends TestServerBase { 10 11 protected void run() { 12 try { 13 ProviderFactory pf = new ProviderFactory(); 14 String f = getClass().getResource("resources/hello_world.js").getFile(); 15 pf.createAndPublish(new File (f), "http://localhost:9000/SoapContext/SoapPort", false); 16 f = getClass().getResource("resources/hello_world.jsx").getFile(); 17 pf.createAndPublish(new File (f), "http://localhost:9100", false); 18 } catch (Exception ex) { 19 ex.printStackTrace(); 20 } 21 } 22 23 public static void main(String [] args) { 24 try { 25 Server s = new Server(); 26 s.start(); 27 } catch (Exception ex) { 28 ex.printStackTrace(); 29 System.exit(-1); 30 } finally { 31 System.out.println("done!"); 32 } 33 } 34 } 35 | Popular Tags |