Im still have some problems with Embedded Tomcat. I'd really appreciate if
someone could guide me with what is really going on in Catalina (4.0.1)
I think the standard Bootstrap class loads up the default web.xml for each
webapplication being deployed.
Is there a way that i do the same using the API in EmbeddedTomcat???
I tried to change my sample web.xml so that it included all of the default
web.xml including my own. But it still didnt work!!
I'd appreciate if someone could guide me through this!
Arvind
-----Original Message-----
From: Arvind Gudipati
Sent: Tuesday, December 11, 2001 1:53 PM
To: 'Tomcat Users List'
Subject: RE: errros in embedded tomcat!
I tried to run the Embedded tomcat from the same directory as the regular
tomcat is running with the same catalina.home and catalina.base system
properties.
I see the logs that the path's are being resolved properly for the same in
Embedded tomcat.
Though it is adding the webapp properly, it seems that the Embedded tomcat
is not adding the default configuration for the webapp that is being
deployed. Whereas the bootstrap class is adding it when it reads from the
server.xml
Im not sure how to add the default configuration to the webapp which im
deploying using the API.
To simulate what is going wrong, try running the
org.apache.catalina.startup.Embedded
instead of
org.apache.catalina.startup.Bootstarp
with the same system properties and classpath (you might have to add the
catalina.jar and other jar files necessary which the Bootstrap class loads
up dynamically)
Though this would start the Embedded engine fine, when u try to browse it
(say in browser goto http://localhost:8080/) it should give you a 503 error
or something!
Arvind
-----Original Message-----
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 11, 2001 12:39 PM
To: Tomcat Users List
Subject: RE: errros in embedded tomcat!
On Tue, 11 Dec 2001, Arvind Gudipati wrote:
> Date: Tue, 11 Dec 2001 08:36:10 -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!
>
> 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!
>
If everything were set correctly, you would not be getting the exception
message about "Error initializing resources" -- that is the key to the
problem. The missing servlet mapping is only a symptom.
Because of the path being reported in the exception message, it appears
that you are definitely *not* getting catalina.home and catalina.base set
right. You should be using an absolute path to the base directory in
which Tomcat is installed -- currently, it's trying to use a relative path
which means it *might* work, but only if your current directory when you
start Tomcat is the right place.
> Arvind
>
Craig
--
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.