Hi, Im trying to embed the tomcat engine into one of our products. I was using the Embedded.java file in "org.apache.cataline.startup" package as an example to startup the embedded engine and i have a few questions/problems.
Without changing any code in Embedded.java io tried to run it.. I got the following exception (sys.out below): ******************************* StandardContext[]: Configuring default Resources StandardContext[]: Error initializing resources: Document base .\.\webapps\.\web apps\ROOT does not exist or is not a readable directory StandardContext[]: Configuring default Loader StandardContext[]: Configuring default Manager StandardContext[]: Processing standard container startup StandardContext[]: Context startup failed due to previous errors StandardContext[]: Stopping StandardContext[]: Stopping filters StandardContext[]: Sending application stop events StandardContext[]: Processing standard container shutdown StandardContext[]: Exception during cleanup after start failed LifecycleException: Container StandardContext[] has not been started at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1147) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:34 40) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3 397) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardHost.start(StandardHost.java:612) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307 ) at org.apache.catalina.startup.Embedded.addEngine(Embedded.java:469) at org.apache.catalina.startup.Embedded.main(Embedded.java:1079) **********************8 The problem seemed to be this statement in Embedded.main method Context root = embedded.createContext("", home + "/webapps/ROOT"); It seemed like it was expecting /webapps/webapps/ROOT directory. so i tried to change the source-code to Context root = embedded.createContext("", home + "/ROOT"); and it ran fine without any exceptions. Now when i try browsing using "http://localhost:8080" it gives me a HTTP Error saying resource "/" not available. Is the example provided in Embedded class really working? Is there is a sample/example somewhere where i can check how to embed tomcat? Also, In the example it says, for ease of deploying web applications use the deploy method as below: ((Deployer) host).deploy("/examples", (new File("./webapps/examples")).toURL()); This doesnot seems to be working as the Deployer class doesnt have the deploy method. Thanks in advance! Arvind CONFIDENTIALITY NOTICE: E-mail may contain confidential information that is legally protected. Do not read this e-mail if you are not the intended recipient. This e-mail transmission, and any documents, files or previous e-mail messages attached to it may contain confidential information that is legally protected. If you are not the intended recipient or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any of the information contained in or attached to this transmission is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify us by reply e-mail, by forwarding this to [EMAIL PROTECTED] or by telephone at (877) PANACYA, and destroy the original transmission and its attachments without reading or saving in any manner. Thank you. For information about PANACYA Inc., please visit our website at http://www.panacya.com.