On Mon, 10 Dec 2001, Arvind Gudipati wrote:
> Date: Mon, 10 Dec 2001 17:14:08 -0500
> From: Arvind Gudipati <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE: errros in embedded tomcat!
>
> I think after doing some tracing ive got to a point where i know that the
> example provided in Embedded class in Tomcat 4.01 version doesnt add to the
> ServletMapping the value "default" for key "/" , which is required.
>
If it were just an issue of adding this mapping, you could easily do so
yourself:
context.addServletMapping("/", "default");
But there are undoubtedly other issues going on, because the
"conf/web.xml" file will be processed correctly *if* you set the
"catalina.base" and "catalina.home" properties correctly. See comments
below about this:
> Is there an example provided anywhere to run the tomcat embedded properly,
> other than the example provided in Embedded.java which doesnt seems to be
> working???
>
>
> Arvind
>
>
>
>
> -----Original Message-----
> From: Arvind Gudipati [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 10, 2001 11:53 AM
> To: [EMAIL PROTECTED]
> Subject: errros in embedded tomcat!
>
>
> 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
This will happen if you do not set the "catalina.base" and "catalina.home"
system properties correctly -- baseically, it's not finding your web
applications, so nothing is going to work right.
If you look at how the "bin/catalina.sh" shell script handles the
"embedded" option on the command line, you'll see that it passes values
for "catalina.home" and "catalina.base" based on the CATALINA_HOME and
CATALINA_BASE environment variables. You need to do something similar to
tell the Embedded class where you have installed Tomcat.
Craig McClanahan
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>