You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Max Länzlinger <ma...@gmx.ch> on 2007/04/27 20:16:23 UTC

WAR File loaded into embedded Tomcat not reachable

Hello,

I want load a war-file programmaticly into the embedded tomcat-server.
I made a Project (MyProject.ZIP) which starts the Server. Also a small web-application as war-file (mynewwar.zip).

The server starts fine, and does so far not complain when loading the web-applikation war File into the standard context. The Problem ist afterwards, i cannot call the web-applikation. 

I Use embedded Tomcat 5.0.30. 

Sure the problem is little, any wrang/mising call to a method, and i would be very happy for help; if it runs i have a chance to embed Tomcat in our Sybase Database which supports Java, and we coud migrate all our xslt Applikations vom inside Sybase to the nice Tomcat resp. write nice JSF instead.

THANKS A LOT FOR HELP
Greetings MAx  


-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

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


RE: WAR File loaded into embedded Tomcat not reachable

Posted by "Reich, Matthias" <ma...@siemens.com>.
Hi,

you did not tell us about how you load the war file.
If the extension is correct (mynewwar.ZIP) I think it won't be loaded automatically.
If it is named mynewwar.war and e.g. available in directory "C:\mywebapps" this should work:


Context ctxt = embedded.createContext("/mynewwar" , "C:\mywebapps\mynewwar.war");
...
host.addChild(ctxt);


If this doesn't not work for you, you may have to do something like

 Loader loader = embedded.createLoader( classLoaderKnowingMynewwar );

 ctxt.setLoader( loader );

before adding the context.


Matthias

> -----Original Message-----
> From: "Max Länzlinger" [mailto:max.laenzlinger@gmx.ch] 
> Sent: Friday, April 27, 2007 8:16 PM
> To: users@tomcat.apache.org
> Subject: WAR File loaded into embedded Tomcat not reachable
> 
> Hello,
> 
> I want load a war-file programmaticly into the embedded tomcat-server.
> I made a Project (MyProject.ZIP) which starts the Server. 
> Also a small web-application as war-file (mynewwar.zip).
> 
> The server starts fine, and does so far not complain when 
> loading the web-applikation war File into the standard 
> context. The Problem ist afterwards, i cannot call the 
> web-applikation. 
> 
> I Use embedded Tomcat 5.0.30. 
> 
> Sure the problem is little, any wrang/mising call to a 
> method, and i would be very happy for help; if it runs i have 
> a chance to embed Tomcat in our Sybase Database which 
> supports Java, and we coud migrate all our xslt Applikations 
> vom inside Sybase to the nice Tomcat resp. write nice JSF instead.
> 
> THANKS A LOT FOR HELP
> Greetings MAx  
> 
> 
> -- 
> "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 

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