thanks for the reply craig!
I tried to add the default servelt mapping using
context.addServletMapping("/", "default");
but i get the following exception:
***
Exception in thread "main" java.lang.IllegalArgumentException: Servlet
mapping specifies an unknown servlet name default
at
org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.j
ava:1624)
at EmbeddedTomcat.main(EmbeddedTomcat.java:96)
*****
Also i made sure i have the catalina.home and cataline.base system
properties set up properly!
Im not sure what is going on here but i'd really appreciate someone to
helping me here!
Arvind
-----Original Message-----
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 8:59 PM
To: Tomcat Users List
Subject: RE: errros in embedded tomcat!
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]>
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.