Maybe I missed some docs somewhere, but my embedded Tomcat isn't working
properly.
I doing essentially this:

Embedded embedded = new Embedded();

embedded.setCatalinaBase(".");

Engine engine = embedded.createEngine();


Host host = embedded.createHost("localhost", ".");

engine.addChild(host);

Context context = embedded.createContext("/dwr", "target/ant/web/demo");

host.addChild(context);


embedded.addEngine(engine);


Connector connector = embedded.createConnector("localhost", 8080, false);

embedded.addConnector(connector);

embedded.start();

And my web-app starts OK, however the ServletContext seems to be null, so
the web-app fails.

I'm not getting any exceptions on startup, and the exact war file that I'm
pointing is found because it's serving HTML and even my servlet just fine.
But when I get a ServletContext, it's null. I've got a set of tomcat jars in
the classpath (catalina, annorations-api, tomcat-coyote, tomcat-juli,
servlet-api)

Any clues where to look?

Joe.

Reply via email to