tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Sexton" <gsex...@mhsoftware.com>
Subject RE: Deploying new virtual hosts
Date Fri, 02 Dec 2005 15:19:25 GMT
I think it would be a lot more practical for me to fix the things wrong with
host-manager than to try and replicate so much of Tomcat's internal
workings.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

> -----Original Message-----
> From: Mikolaj Rydzewski [mailto:mikolajr@becomo.com] 
> Sent: Friday, December 02, 2005 4:51 AM
> To: Tomcat Users List
> Subject: Re: Deploying new virtual hosts
> 
> Have you tried embeded tomcat? It's very easy to set up, and add new 
> hosts, contexts, etc. on the fly. So it would be possible with very 
> little effort to create small app to create/delete any host 
> inside such 
> tomcat.
> 
> Sample code:
> 
> embedded = new Embedded();
> embedded.setCatalinaHome(catalinaHome.getAbsolutePath());
> Engine engine = embedded.createEngine();
> engine.setDefaultHost("localhost");
> Host host = embedded.createHost("localhost", 
> appBase.getAbsolutePath());
> engine.addChild(host);
> Context ctx = embedded.createContext("/ctx, 
> docBase.getAbsolutePath());
> host.addChild(ctx);
> embedded.addEngine(engine);
> Connector connector = embedded.createConnector((InetAddress) 
> null, 8080, 
> false);
> embedded.addConnector(connector);
> embedded.start();
> 
> 
> -- 
> Mikolaj Rydzewski  <mikolajr@becomo.com>
> Becomo S.A.
> tel. (12) 2927104
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message