tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Schiffer <schiffermatth...@web.de>
Subject Re: How to embed Tomcat into an existing application OR how to use EmbededTomcat - Class
Date Wed, 21 Mar 2001 12:56:11 GMT
Hi!

Nochmals Danke, mit der neuen Version ist es mir geglückt den Server ans
Laufen zu bekommen. Nun hoffe ich noch ihn so ausrichten zu können, dass
er SMI-Commands an die richtige Stelle weiterleitet, das ist doch auch
konfigurierbar oder ?

Klaus Sonnenleiter schrieb:
> 
> Matthias,
> 
> I have tried to use both the 3.2 and the 4.0 version of embedded Tomcat and
> I never got it working properly with the instructions in the 3.2
> "EmbededTomcat.java" file. You might want to switch to 4.0 instead - I think
> both Tomcat and especially the embedded part have matured significantly
> since 3.2.
> 
> Klaus Sonnenleiter
> 
> -----Original Message-----
> From: Matthias Schiffer <schiffermatthias@web.de>
> To: tomcat-user@jakarta.apache.org <tomcat-user@jakarta.apache.org>
> Date: Sunday, May 20, 2001 6:27 AM
> Subject: How to embed Tomcat into an existing application OR how to use
> EmbededTomcat - Class
> 
> >Hi!
> >
> >I have developed an application which runs with the jo!-server at the
> >moment, now I want to replace it with the embeded Tomcat, but i don't
> >really know how!!! Can someone write me a short explanation how to embed
> >Tomcat into my application? Below you can see what i have tried to
> >embed, but this does not work and additional: i know that the src is not
> >complete but some additional things are missing, please write which ones
> >that are. Thank you very much!
> >
> >Source code:
> >
> >public static void main( String[] args) throws ServerException {
> >  ContextManager cm = new ContextManager();
> >WebXmlReader xml = new WebXmlReader();
> >EmbededTomcat et = new EmbededTomcat();
> >try {
> > xml.engineInit(cm);
> >}catch(TomcatException te) {
> > System.out.println("Exception: " + te);
> >}
> >Context ctx = new Context();
> >ctx.setContextManager(cm);
> >cm.setTomcatHome("/home/matsch/synet/tomcat");
> >xml.setContextManager(cm) ;
> >try {
> > xml.contextInit(ctx);
> >}catch(TomcatException te) {
> > System.out.println("Exception: " +te);
> >}
> >AdminService admin = new AdminService();
> >admin.setName( "AdminService");
> >admin.start();
> >}
> >

Mime
View raw message