You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Piers Finlayson <Pi...@metaswitch.com> on 2005/11/25 14:42:25 UTC

Help embedding apache tomcat and axis within java app

Hi there,

I'm fairly new to tomcat, and I'm trying to deploy axis within apache
tomcat, with tomcat embedded within my own java application.

I've followed the instructions to run tomcat embedded within another
application, and tomcat is now running.  However, I can't figure out how
to actually get axis deployed and running within tomcat.  I suspect I've
done something spectacularly stupid, but if you could help me, I'd be
very grateful.  The code I have in my java application to run tomcat is
as follows.

    tomcat = new Embedded();
    tomcatEngine = tomcat.createEngine();
    tomcatHost = tomcat.createHost("localhost",
"y:\\tomcat\\webapps\\axis\\WEB-INF");
    tomcatEngine.addChild(tomcatHost);
    tomcatEngine.setDefaultHost(tomcatHost.getName());
    tomcatContextdefault = tomcat.createContext("", "");
    tomcatHost.addChild(tomcatContextdefault);
    tomcat.addEngine(tomcatEngine);
    tomcatConnector = tomcat.createConnector(tomcatHost.getName(), 8080,
false);
    tomcat.addConnector(tomcatConnector);

The bit I suspect is totally wrong is this line, but I'm at a loss to
what I should do.

    tomcatHost = tomcat.createHost("localhost",
"y:\\tomcat\\webapps\\axis\\WEB-INF");

I'm using tomcat 5.5 and axis 1.3.

TIA for you help!

Cheers,
Piers