[Simpleweb-Support] simpleweb from ant
Brought to you by:
niallg
From: Stohrer, H. <hst...@et...> - 2004-02-26 19:31:22
|
Hi, I would like to use simpleweb as a http front end to my app so that I = can do anteater tests, or expose a simple web page for tests to be = performed. I would like to start the server from ant but am confused = about a few things. I'm using 3.2.2 (I'll explain why below). When I set the classpath in the ant junit target - I am hit with "class = not found" errors. But when I export CLASSPATH I am able to get past = this? What is the difference? I would like to not have to set the = CLASSPATH environment variable. When I do set the CLASSPATH - I get this error:=20 : simple.http.load.LoadingException: java.lang.NoSuchMethodException: = com.etrade.gatewaytest.SimpleHttp.<init>(simple.http.serve.Context) Yet I am using the same code as the Hello.java example class, with the = same constructor. public class SimpleHttp extends BasicService { public SimpleHttp (Context context) { super(context); } =20 public void process(Request req, Response resp) throws Exception { PrintStream out =3D resp.getPrintStream(); resp.set("Content-Type", "text/plain"); resp.setDate("Date", System.currentTimeMillis()); /* * Write the content body =20 */ out.println("HELLO"); out.close(); } } As an aside - I was not able to run the example java classes with 3.2.3 = - had rmi stub class not found errors. I don't know if anyone else has = seen this. Also - the archive does not seem to be working. Thanks, Horst=20 |