You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Anand HS <an...@gmail.com> on 2008/12/01 22:28:16 UTC

What exactly happens when I configure a different host

Hi,
I am trying to deploy a simple war file into a freshly downloaded tomcat
6.0.18.
I noticed a strange behavior when I tried to configure a virtual host by
changing the Host Name in server.xml from the default "localhost" to "
mydomain.com".

The strange behavior goes like this

1. the web.xml inside my war has a servlet defined which is not presnet in
the war file or any of the libraries tomcat loads.
2. With the default host name as localhost, tomcat does not thrown any
"ClassNotFound" exception for not finding this missing servlet.
3. If i change the host name, tomcat throws a nice

java.lang.ClassNotFoundException: com.psi.servlet.Log4jInitializerServlet
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1094)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)

( Log4jInitializerServlet is my servlet which is missing ).

I can get rid of this error by removing the servlet inclusion block though.

Can any one tell me why the localhost as Host name ignores this error. ?

I can provide more details if wanted.

Thanks,
Anand

Re: What exactly happens when I configure a different host

Posted by Anand HS <an...@gmail.com>.
The real reason is I have 3 web apps I want to deploy in a single tomcat
instance and all 3 have to be exposed with root context and also need to be
running on port 80. Hence, I have chosen to give my machine that runs tomcat
to have 3 distinct DNS Names/Addresses and configures these names/addresses
as the <Host> Name.

The 3 web apps are required to be running 80 all the time and also have to
have a root context all the time too.

I basically did this as this was a simple solution.  However, I am
interested in seeing alternatives for this approach.

Thanks,
Anand

On Thu, Dec 4, 2008 at 12:13 AM, André Warnier <aw...@ice-sa.com> wrote:

> Caldarale, Charles R wrote:
>
>> From: Anand HS [mailto:anandhs@gmail.com]
>>> Subject: Re: What exactly happens when I configure a different host
>>>
>>> Does that mean when we change the <Host>, we have to have a
>>> handler added in logging.properties as well. ?
>>>
>>
>> Have to - no; should - probably.  If you don't define one, the logging
>> info ends up in the default handler.
>>
>>  Maybe the real question to the OP is : why do you want to change the name
> of the default Host ? what does that bring you ?
> (it's not a snappy question, it's a real question; maybe if you exlain your
> reason, we might suggest another solution)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: What exactly happens when I configure a different host

Posted by André Warnier <aw...@ice-sa.com>.
Caldarale, Charles R wrote:
>> From: Anand HS [mailto:anandhs@gmail.com]
>> Subject: Re: What exactly happens when I configure a different host
>>
>> Does that mean when we change the <Host>, we have to have a
>> handler added in logging.properties as well. ?
> 
> Have to - no; should - probably.  If you don't define one, the logging info ends up in the default handler.
> 
Maybe the real question to the OP is : why do you want to change the 
name of the default Host ? what does that bring you ?
(it's not a snappy question, it's a real question; maybe if you exlain 
your reason, we might suggest another solution)



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


RE: What exactly happens when I configure a different host

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Anand HS [mailto:anandhs@gmail.com]
> Subject: Re: What exactly happens when I configure a different host
>
> Does that mean when we change the <Host>, we have to have a
> handler added in logging.properties as well. ?

Have to - no; should - probably.  If you don't define one, the logging info ends up in the default handler.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

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


Re: What exactly happens when I configure a different host

Posted by Anand HS <an...@gmail.com>.
Whew.. that was a problem alright..
Does that mean when we change the <Host>, we have to have a handler added in
logging.properties as well. ?
I see there are already defined for applications packaged with tomcat like
manager and host-manager.

Thanks,
Anand


On Wed, Dec 3, 2008 at 7:54 AM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Anand HS [mailto:anandhs@gmail.com]
> > Subject: Re: What exactly happens when I configure a different host
> >
> > I changed the <Host> Name and <Engine> defaultHost back to
> > localhost and the error vanishes.
> > However, it re appears when I give a different name than localhost.
>
> Finally had time to go chase this a bit more.  The error doesn't really
> "vanish" when the <Host> name is "localhost", but it is not sent to the
> console window Tomcat is using, nor to the catalina.*.log file; you can find
> it in the localhost.*.log file.
>
> When you change the <Host> name to something else, the error is displayed
> in the console window and in the catalina.*.log file, but not in
> localhost.*.log.
>
> The reason behind this apparently inconsistent behavior is the settings in
> conf/logging.properties:  log entries for "localhost" are routed to specific
> handlers, which do not include the console window.  When you changed the
> <Host> name but did not update logging.properties, the default log handler
> kicked in, which dumped the error message to the console.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> 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: What exactly happens when I configure a different host

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Anand HS [mailto:anandhs@gmail.com]
> Subject: Re: What exactly happens when I configure a different host
>
> I changed the <Host> Name and <Engine> defaultHost back to
> localhost and the error vanishes.
> However, it re appears when I give a different name than localhost.

Finally had time to go chase this a bit more.  The error doesn't really "vanish" when the <Host> name is "localhost", but it is not sent to the console window Tomcat is using, nor to the catalina.*.log file; you can find it in the localhost.*.log file.

When you change the <Host> name to something else, the error is displayed in the console window and in the catalina.*.log file, but not in localhost.*.log.

The reason behind this apparently inconsistent behavior is the settings in conf/logging.properties:  log entries for "localhost" are routed to specific handlers, which do not include the console window.  When you changed the <Host> name but did not update logging.properties, the default log handler kicked in, which dumped the error message to the console.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
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: What exactly happens when I configure a different host

Posted by Anand HS <an...@gmail.com>.
Yes.
I changed the <Host> Name and <Engine> defaultHost back to localhost and the
error vanishes.
However, it re appears when I give a different name than localhost.



On Mon, Dec 1, 2008 at 10:14 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Anand HS [mailto:anandhs@gmail.com]
> > Subject: Re: What exactly happens when I configure a different host
> >
> > When tomcat starts with host name = "localhost", it does NOT
> > throw any error about missing class file.
>
> Sorry, now I understand your concern.
>
> Have you tried changing the <Host> name and the <Engine> defaultHost
> setting back to localhost now that you have the webapp properly named and
> the <Context> element in the correct place?
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> 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: What exactly happens when I configure a different host

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Anand HS [mailto:anandhs@gmail.com]
> Subject: Re: What exactly happens when I configure a different host
>
> When tomcat starts with host name = "localhost", it does NOT
> throw any error about missing class file.

Sorry, now I understand your concern.

Have you tried changing the <Host> name and the <Engine> defaultHost setting back to localhost now that you have the webapp properly named and the <Context> element in the correct place?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
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: What exactly happens when I configure a different host

Posted by Anand HS <an...@gmail.com>.
I extremely sorry for not being able to clarify to you.
There is definitely a reference to the Log4jInitialiserservlet in my web.xml
( pasted above ).
The servlet is missing in my jars/wars. . So i expect tomcat to throw error
when it starts
When tomcat starts with host name = "localhost", it does NOT throw any error
about missing class file.
But when i start with the host name = "blahblah" it throws the error.

The question is why did not throw in the first case and why did it throw in
the second. ?

Thanks,
Anand

On Mon, Dec 1, 2008 at 8:00 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Anand HS [mailto:anandhs@gmail.com]
> > Subject: Re: What exactly happens when I configure a different host
> >
> > Here is the web.xml from my webapp -
> >
> > <servlet>
> >  <servlet-name>action</servlet-name>
> >  <servlet-class>com.psi.servlet.Log4jInitializerServlet</servlet-class>
> >  <init-param>
> >   <param-name>debug</param-name>
> >   <param-value>2</param-value>
> >  </init-param>
> >  <load-on-startup>2</load-on-startup>
> > </servlet>
>
> I thought you said your web.xml didn't have a reference to
> Log4jInitializerServlet?  Then what are we looking at above?  You need to
> make the class file available in WEB-INF/classes or in a jar in WEB-INF/lib.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> 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
>
>

webapp deploy/undeploy log4j and other weirdnesses

Posted by "Prastein, Rebeccah H" <Re...@questdiagnostics.com>.
The deeper I dig, the more I'm confusing myself, and the more weird
stuff I unearth, so I apologize if this seems disjointed.  I know it's
all a big jumbled mess, and I'll need to chop it up into separate
topics, but if anyone has any clues about *any* of this, I'd be most
appreciative.

I started out with a problem of log4j not writing all of the log
statements to my RollingFileAppender right away - like some sort of I/O
blocking.  If I log enough statements, eventually all of the accumulated
ones write out, but it doesn't seem to be just a time-dependent thing (I
may be wrong about that, though, need to test some more).  So, I thought
maybe it was buffering.  But I have all of the log4j settings related to
buffering set to not buffer, and to flush at the end of each line (and
these are the defaults for FileAppenders anyway).

I'm not using a PropertyConfigurator or a BasicConfigurator, I'm using a
servlet (called Log4JServlet) that loads first on startup, and manually
configuring log4j there so that I can change the logging levels later.

Next, I started getting an unload() exception *after* completing the
Log4JServlet.init() method, complaining about some unspecified exception
in the destroy() method for the Log4JServlet.  The stack trace showed
inability to close a QuietWriter, which is an internally sequestered
part of a log4j WriterAppender.  So evidently there is some Appender
that isn't being closed down properly when my web app is redeployed, and
it only gets GC'd after the Log4JServlet is initialized.  Interestingly,
I'm no longer getting the unload() and Log4JServlet.destroy() parts of
the message any more (since I commented out the
ROOT_LOGGER.removeAllAppenders() and REQUEST_LOGGER.removeAllAppenders()
from Log4JServlet.destroy()), but I'm still intermittently getting the
issues with closing the QuietWriter.

Then, I started getting notices about log4j not being properly
initialized (not having any appenders) for a logger I don't even use,
for org.apache.commons.digester.Digester.sax.  I've searched my web app,
including the spring framework jars, and I haven't found
commons-digester anywhere, so I don't know where this is coming from,
although the error appeared shortly after I got rid of the
log4j.properties file.  I also looked at the other web applications
running on Tomcat, although I would think that Tomcat would keep them
all separate, and I haven't changed Tomcat's default logging at all.
The Log4JServlet is supposed to load before anything else, but I did add
some Spring dependency injection into it, so I'm guessing most likely
Spring uses commons-digester and I just haven't found it yet.  Not a big
deal, just annoying.

Subsequent addition of code to list out all of the Appenders in my
default Hierarchy and suss out the QuietWriters associated with them,
shows a huge number of loggers that I don't explicitly create, most of
them associated with Spring.  There are several associated with apache
and/or Tomcat, or perhaps with the web application context that Tomcat
provides:
	
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/MSScalcu
lator].[default]
	
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/MSScalcu
lator].[webcalculator]
	org.apache.commons.digester.Digester.sax
	org.apache.catalina.session.ManagerBase
	
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/MSScalcu
lator].[jsp]
	
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/MSScalcu
lator]
	
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/MSScalcu
lator].[log4j]
	org.apache.commons.digester.Digester
	
FYI, "/MSScalculator" is the path to my web application, "webcalculator"
is the name of my web application's main servlet in web.xml, and "log4j"
is the name of the Log4JServlet servlet in web.xml.

Oh, and none of the QuietWriter objects that I find by enumerating all
of the Appenders are the ones that I'm seeing exceptions about closing
during servlet finalization.

I actually have two log files that my application appends to:  a debug
log file, and a request log file.  I extended the log4j PatternLayout
that I use for RollingFileAppender for the request log file, to include
a header row at the top of each rolled log file.  It actually writes the
ehader row each time the file is opened, so I expect to see multiple
header rows in a single file as I'm tweaking around.  However, yesterday
I noticed they were always being written in pairs (same timestamp), and
today, in triplets.  This suggests to me that somehow appenders are
sometimes not going away when the app is reloading, and I'm getting two
or now three appenders writing to the same file.  But it's not happening
every time that I reload, or I'd be getting way more than three of
these.

I've also noticed that I'm not getting output to my debug log file at
all any more.  Sigh.

On Friday, to make matters worse, I got an Out of Memory Error (Perm
Gen), three of them actually, each one giving the name of a timer thread
that I use in my main web application.  Those threads are supposed to
die all by themselves after just a few seconds.  I wrote some code to do
a kind of a thread dump, that I call at different points when I'm
confused about what is going on, and today, I found two of them, running
as daemons!  I don't have any code to make them daemons that I know of.

So now, instead of one problem, I'm chasing a bunch of them, but they
seem to fall into two main categories:

1.  Why have I got timer threads hanging around when I redeploy my
webcalculator application?  I need to revisit that code.  Related
question:  How are they turning into daemons?  I don't want them to be
daemons!  This is certainly a bug in my own code, I just need to find
it.

2.  WTF is going on with the log4j appenders during web application
redeployment?  What does Tomcat do with them?  What does Spring do with
them?  Why do they intermittently seem to be incompletely destroyed, or
functioning autonymously?  

Any thoughts appreciated.  I'm going to go back to a simpler version of
my Log4JServlet before I started adding all this debugging stuff, and
see if I can isolate one issue at a time.

Rebeccah




------------------------------------------
The contents of this message, together with any attachments, are
intended only for the use of the person(s) to which they are
addressed and may contain confidential and/or privileged
information. Further, any medical information herein is
confidential and protected by law. It is unlawful for unauthorized
persons to use, review, copy, disclose, or disseminate confidential
medical information. If you are not the intended recipient,
immediately advise the sender and delete this message and any
attachments. Any distribution, or copying of this message, or any
attachment, is prohibited.

---------------------------------------------------------------------
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: What exactly happens when I configure a different host

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Anand HS [mailto:anandhs@gmail.com]
> Subject: Re: What exactly happens when I configure a different host
>
> Here is the web.xml from my webapp -
>
> <servlet>
>  <servlet-name>action</servlet-name>
>  <servlet-class>com.psi.servlet.Log4jInitializerServlet</servlet-class>
>  <init-param>
>   <param-name>debug</param-name>
>   <param-value>2</param-value>
>  </init-param>
>  <load-on-startup>2</load-on-startup>
> </servlet>

I thought you said your web.xml didn't have a reference to Log4jInitializerServlet?  Then what are we looking at above?  You need to make the class file available in WEB-INF/classes or in a jar in WEB-INF/lib.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
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: What exactly happens when I configure a different host

Posted by Anand HS <an...@gmail.com>.
Have you modified conf/web.xml at all?
[No.. I have not modified web.xml, because the war I have deployed has its
own web.xml ]

Delete everything under conf/Catalina to make sure there are no left-over
<Context> elements pointing to webapps somewhere.
[I have done this. Same error even after that]

Delete everything under Tomcat's work directory to insure there's nothing in
there that might be referencing a servlet.
[I have done this too. Same error after that]

Here is the web.xml from my webapp -

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app version="2.4"
      xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<!-- Servlets for SOAP router -->
    <display-name>Offline Soap Service</display-name>
    <description>These two servlets are responsible for routing the SOAP
request wrapped by Http Request to the respective Services</description>

    <context-param>
    <param-name>menuxml</param-name>
    <param-value>Menu_Admin.xml</param-value>
    </context-param>

  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>com.psi.servlet.Log4jInitializerServlet</servlet-class>

    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>



    <servlet>
        <servlet-name>rpcrouter</servlet-name>
        <display-name>Apache-SOAP RPC Router</display-name>
        <description>no description</description>

<servlet-class>org.apache.soap.server.http.RPCRouterServlet</servlet-class>
        <init-param>
            <param-name>faultListener</param-name>

<param-value>org.apache.soap.server.DOMFaultListener</param-value>
        </init-param>
    </servlet>
    <servlet>
        <servlet-name>messagerouter</servlet-name>
        <display-name>Apache-SOAP Message Router</display-name>

<servlet-class>org.apache.soap.server.http.MessageRouterServlet</servlet-class>
        <init-param>
            <param-name>faultListener</param-name>

<param-value>org.apache.soap.server.DOMFaultListener</param-value>
        </init-param>
    </servlet>
    <servlet>
        <servlet-name>ScoreReportGeneratorServlet</servlet-name>

<servlet-class>com.psi.servlet.ScoreReportGeneratorServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>ContentDisplayServlet</servlet-name>
        <servlet-class>com.psi.servlet.ContentDisplayServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>TestServlet</servlet-name>

<servlet-class>com.psi.authoring.assessment.user.servlet.TestServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>ReportDisplayServlet</servlet-name>
        <servlet-class>com.psi.servlet.ReportDisplayServlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>TreeServlet</servlet-name>
        <servlet-class>com.psi.authoring.servlet.TreeServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>PrintControllerServlet</servlet-name>

<servlet-class>com.psi.authoring.servlet.PrintControllerServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>IVRServlet</servlet-name>
        <servlet-class>com.psi.servlet.IVRServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>LicenseContentDisplayServlet</servlet-name>

<servlet-class>com.psi.license.servlet.ContentDisplayServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>RexControllerServlet</servlet-name>

<servlet-class>com.psi.authoring.servlet.RexControllerServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>AuthoringContentDisplayServlet</servlet-name>

<servlet-class>com.psi.authoring.servlet.ContentDisplayServlet</servlet-class>
    </servlet>
    <servlet>
            <servlet-name>PageContentServlet</servlet-name>

<servlet-class>com.psi.servlet.PageContentServlet</servlet-class>
    </servlet>

    <servlet>
            <servlet-name>ExhibitContentServlet</servlet-name>

<servlet-class>com.psi.authoring.servlet.ExhibitContentServlet</servlet-class>
    </servlet>

    <servlet>
            <servlet-name>ItemExhibitContentServlet</servlet-name>

<servlet-class>com.psi.authoring.servlet.ItemExhibitContentServlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>CDServiceServlet</servlet-name>
        <servlet-class>com.psi.servlet.CDServiceServlet</servlet-class>
    </servlet>

     <servlet>
        <servlet-name>ScheduleServiceServlet</servlet-name>

<servlet-class>com.psi.servlet.ScheduleServiceServlet</servlet-class>
        <init-param>
            <param-name>logParamFile</param-name>

<param-value>..\\..\\Application\\properties\\log4j.xml</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
        <servlet-name>ScheduleServiceServlet</servlet-name>
        <url-pattern>/ScheduleService</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>CDServiceServlet</servlet-name>
        <url-pattern>/CDService</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
            <servlet-name>PageContentServlet</servlet-name>
            <url-pattern>/pagecontentservlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>AuthoringContentDisplayServlet</servlet-name>
        <url-pattern>/authoringcontentdisplay</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>RexControllerServlet</servlet-name>
        <url-pattern>/RexControllerServlet</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>TreeServlet</servlet-name>
        <url-pattern>/TreeServlet</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>rpcrouter</servlet-name>
        <url-pattern>/servlet/rpcrouter</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>messagerouter</servlet-name>
        <url-pattern>/servlet/messagerouter</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ScoreReportGeneratorServlet</servlet-name>
        <url-pattern>/ScoreReportGeneratorServlet</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
            <servlet-name>ExhibitContentServlet</servlet-name>
            <url-pattern>/ExhibitContentServlet</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
            <servlet-name>ItemExhibitContentServlet</servlet-name>
            <url-pattern>/ItemExhibitContentServlet</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>ContentDisplayServlet</servlet-name>
        <url-pattern>/contentdisplay</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ReportDisplayServlet</servlet-name>
        <url-pattern>/ReportDisplayServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>TestServlet</servlet-name>
        <url-pattern>/TestServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>PrintControllerServlet</servlet-name>
        <url-pattern>/PrintControllerServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>IVRServlet</servlet-name>
        <url-pattern>/ivr_service</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>LicenseContentDisplayServlet</servlet-name>
        <url-pattern>/licensecontentdisplay</url-pattern>
    </servlet-mapping>

    <!-- Establish the default MIME type mappings -->
    <mime-mapping>
        <extension>txt</extension>
        <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>html</extension>
        <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>htm</extension>
        <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>gif</extension>
        <mime-type>image/gif</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jpg</extension>
        <mime-type>image/jpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jpe</extension>
        <mime-type>image/jpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jpeg</extension>
        <mime-type>image/jpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>java</extension>
        <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>body</extension>
        <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>rtx</extension>
        <mime-type>text/richtext</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tsv</extension>
        <mime-type>text/tab-separated-values</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>etx</extension>
        <mime-type>text/x-setext</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ps</extension>
        <mime-type>application/x-postscript</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>class</extension>
        <mime-type>application/java</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>csh</extension>
        <mime-type>application/x-csh</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>sh</extension>
        <mime-type>application/x-sh</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tcl</extension>
        <mime-type>application/x-tcl</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tex</extension>
        <mime-type>application/x-tex</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>texinfo</extension>
        <mime-type>application/x-texinfo</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>texi</extension>
        <mime-type>application/x-texinfo</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>t</extension>
        <mime-type>application/x-troff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tr</extension>
        <mime-type>application/x-troff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>roff</extension>
        <mime-type>application/x-troff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>man</extension>
        <mime-type>application/x-troff-man</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>me</extension>
        <mime-type>application/x-troff-me</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ms</extension>
        <mime-type>application/x-wais-source</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>src</extension>
        <mime-type>application/x-wais-source</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>zip</extension>
        <mime-type>application/zip</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>bcpio</extension>
        <mime-type>application/x-bcpio</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>cpio</extension>
        <mime-type>application/x-cpio</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>gtar</extension>
        <mime-type>application/x-gtar</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>shar</extension>
        <mime-type>application/x-shar</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>sv4cpio</extension>
        <mime-type>application/x-sv4cpio</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>sv4crc</extension>
        <mime-type>application/x-sv4crc</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tar</extension>
        <mime-type>application/x-tar</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ustar</extension>
        <mime-type>application/x-ustar</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>dvi</extension>
        <mime-type>application/x-dvi</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>hdf</extension>
        <mime-type>application/x-hdf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>latex</extension>
        <mime-type>application/x-latex</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>bin</extension>
        <mime-type>application/octet-stream</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>oda</extension>
        <mime-type>application/oda</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pdf</extension>
        <mime-type>application/pdf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ps</extension>
        <mime-type>application/postscript</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>eps</extension>
        <mime-type>application/postscript</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ai</extension>
        <mime-type>application/postscript</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>rtf</extension>
        <mime-type>application/rtf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>nc</extension>
        <mime-type>application/x-netcdf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>cdf</extension>
        <mime-type>application/x-netcdf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>cer</extension>
        <mime-type>application/x-x509-ca-cert</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>exe</extension>
        <mime-type>application/octet-stream</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>gz</extension>
        <mime-type>application/x-gzip</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>Z</extension>
        <mime-type>application/x-compress</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>z</extension>
        <mime-type>application/x-compress</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>hqx</extension>
        <mime-type>application/mac-binhex40</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mif</extension>
        <mime-type>application/x-mif</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ief</extension>
        <mime-type>image/ief</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tiff</extension>
        <mime-type>image/tiff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tif</extension>
        <mime-type>image/tiff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ras</extension>
        <mime-type>image/x-cmu-raster</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pnm</extension>
        <mime-type>image/x-portable-anymap</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pbm</extension>
        <mime-type>image/x-portable-bitmap</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pgm</extension>
        <mime-type>image/x-portable-graymap</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ppm</extension>
        <mime-type>image/x-portable-pixmap</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>rgb</extension>
        <mime-type>image/x-rgb</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xbm</extension>
        <mime-type>image/x-xbitmap</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xpm</extension>
        <mime-type>image/x-xpixmap</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xwd</extension>
        <mime-type>image/x-xwindowdump</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>au</extension>
        <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>snd</extension>
        <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>aif</extension>
        <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>aiff</extension>
        <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>aifc</extension>
        <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>wav</extension>
        <mime-type>audio/x-wav</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mpeg</extension>
        <mime-type>video/mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mpg</extension>
        <mime-type>video/mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mpe</extension>
        <mime-type>video/mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>qt</extension>
        <mime-type>video/quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mov</extension>
        <mime-type>video/quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>qt</extension>
        <mime-type>video/quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>avi</extension>
        <mime-type>video/x-msvideo</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>movie</extension>
        <mime-type>video/x-sgi-movie</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>avx</extension>
        <mime-type>video/x-rad-screenplay</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>wrl</extension>
        <mime-type>x-world/x-vrml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mpv2</extension>
        <mime-type>video/mpeg2</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- WML Source -->
        <extension>wml</extension>
        <mime-type>text/vnd.wap.wml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- Compiled WML -->
        <extension>wmlc</extension>
        <mime-type>application/vnd.wap.wmlc</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- WML Script Source -->
        <extension>wmls</extension>
        <mime-type>text/vnd.wap.wmls</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- Compiled WML Script -->
        <extension>wmlscriptc</extension>
        <mime-type>application/vnd.wap.wmlscriptc</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- Wireless Bitmap -->
        <extension>wbmp</extension>
        <mime-type>image/vnd.wap.wbmp</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mp2</extension>
        <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mp3</extension>
        <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mp1</extension>
        <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mpa</extension>
        <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>abs</extension>
        <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mpega</extension>
        <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>midi</extension>
        <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mid</extension>
        <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>smf</extension>
        <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>kar</extension>
        <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>aiff</extension>
        <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>aif</extension>
        <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>aifc</extension>
        <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>aim</extension>
        <mime-type>application/x-aim</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>art</extension>
        <mime-type>image/x-jg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>au</extension>
        <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>snd</extension>
        <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ulw</extension>
        <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>bmp</extension>
        <mime-type>image/bmp</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>dib</extension>
        <mime-type>image/bmp</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>cdf</extension>
        <mime-type>application/x-cdf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>dv</extension>
        <mime-type>video/x-dv</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>m3u</extension>
        <mime-type>audio/x-mpegurl</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jar</extension>
        <mime-type>application/java-archive</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>hqx</extension>
        <mime-type>application/mac-binhex40</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pnt</extension>
        <mime-type>image/x-macpaint</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mac</extension>
        <mime-type>image/x-macpaint</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>asf</extension>
        <mime-type>video/x-ms-asf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>asx</extension>
        <mime-type>video/x-ms-asf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>doc</extension>
        <mime-type>application/msword</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>rm</extension>
        <mime-type>application/vnd.rn-realmedia</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>psd</extension>
        <mime-type>image/x-photoshop</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pic</extension>
        <mime-type>image/pict</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pict</extension>
        <mime-type>image/pict</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pct</extension>
        <mime-type>image/pict</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pls</extension>
        <mime-type>audio/x-scpls</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>png</extension>
        <mime-type>image/png</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>qti</extension>
        <mime-type>image/x-quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>qtif</extension>
        <mime-type>image/x-quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>swf</extension>
        <mime-type>application/x-shockwave-flash</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>dtd</extension>
        <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xls</extension>
        <mime-type>application/vnd.ms-excel</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xls</extension>
        <mime-type>application/x-msexcel</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ppt</extension>
        <mime-type>application/vnd.ms-powerpoint</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ppt</extension>
        <mime-type>application/x-mspowerpoint</mime-type>
    </mime-mapping>
</web-app>



On Mon, Dec 1, 2008 at 7:33 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Anand HS [mailto:anandhs@gmail.com]
> > Subject: Re: What exactly happens when I configure a different host
> >
> > The thing is this servlet is not present at all.
>
> Have you modified conf/web.xml at all?
>
> Delete everything under conf/Catalina to make sure there are no left-over
> <Context> elements pointing to webapps somewhere.
>
> Delete everything under Tomcat's work directory to insure there's nothing
> in there that might be referencing a servlet.
>
> Restart Tomcat and see what happens.  If the problem persists, post the
> WEB-INF/web.xml from your webapp along with the entire stack trace of the
> error.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> 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: What exactly happens when I configure a different host

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Anand HS [mailto:anandhs@gmail.com]
> Subject: Re: What exactly happens when I configure a different host
>
> The thing is this servlet is not present at all.

Have you modified conf/web.xml at all?

Delete everything under conf/Catalina to make sure there are no left-over <Context> elements pointing to webapps somewhere.

Delete everything under Tomcat's work directory to insure there's nothing in there that might be referencing a servlet.

Restart Tomcat and see what happens.  If the problem persists, post the WEB-INF/web.xml from your webapp along with the entire stack trace of the error.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
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: What exactly happens when I configure a different host

Posted by Anand HS <an...@gmail.com>.
The thing is this servlet is not present at all.
It is wrongly being referenced web.xml.
The original point of my question was just that..
When I configure host name as localhost ( which is by default ) , tomcat
doesnt throw error saying this class is not found.
But When I change the host name to soemthing else ( for eg , an IP address
that is referenced by DNS , ) tomcat throws the error about the class not
being found.
So, my questions was what is the difference between host name as localhost
and host name as something else , that makes tomcat recognise this class as
not being present

Thanks,
Anand

On Mon, Dec 1, 2008 at 5:42 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Anand HS [mailto:anandhs@gmail.com]
> > Subject: Re: What exactly happens when I configure a different host
> >
> > java.lang.ClassNotFoundException:
> > com.psi.servlet.Log4jInitializerServlet
>
> So where is the class file for com.psi.servlet.Log4jInitializerServlet
> located?
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> 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: What exactly happens when I configure a different host

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Anand HS [mailto:anandhs@gmail.com]
> Subject: Re: What exactly happens when I configure a different host
>
> java.lang.ClassNotFoundException:
> com.psi.servlet.Log4jInitializerServlet

So where is the class file for com.psi.servlet.Log4jInitializerServlet located?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
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: What exactly happens when I configure a different host

Posted by Anand HS <an...@gmail.com>.
I did these steps -

1. Renamed admin-web to ROOT.
2. made sure to delete existing ROOT folder that comes bundled with tomcat.
3. Added context.xml to webapps/ROOT/META-INF with contents being
<Context>
</Context>

4. This is the error on restarting

INFO: Marking servlet action as unavailable
Dec 1, 2008 2:53:50 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Error loading WebappClassLoader
  delegate: false
..
..
..

SEVERE: Servlet  threw load() exception
java.lang.ClassNotFoundException: com.psi.servlet.Log4jInitializerServlet
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1094)

On Mon, Dec 1, 2008 at 2:22 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Anand HS [mailto:anandhs@gmail.com]
> > Subject: Re: What exactly happens when I configure a different host
> >
> > Thats exactly what I have.
>
> Good.
>
> > <Context path="" docBase="admin-web">
> >  <Valve className="org.apache.catalina.valves.AccessLogValve"
> >   directory="\\10.168.48.254
> \web_app_logs\QA1\Logs\SDQA1-WEB\TOMCAT\admin\accesslog"
> >   prefix="localhost_access_log_admin."
> >   suffix=".txt"
> >   pattern="common" />
> >  <Valve className="org.apache.catalina.valves.AccessLogValve"
> >   directory="\\10.168.48.254
> \web_app_logs\QA1\Logs\SDQA1-WEB\TOMCAT\all\accesslog"
> >   prefix="localhost_access_log."
> >   suffix=".txt"
> >   pattern="common" />
> > </Context>
>
> It's bad practice to put a <Context> element inside server.xml, especially
> for the default webapp.  You now have that webapp deployed twice, once as
> "", and again as "admin-web".  Before proceeding, change the name of the
> webapp directory from webapps/admin-web to webapps/ROOT (case-sensitive,
> even on Windows), and place the <Context> element in
> webapps/ROOT/META-INF/context.xml (also case-sensitive), but without the
> path and docBase attributes.  Delete any existing webapps/ROOT directory or
> webapps/ROOT.war file before renaming yours, of course.
>
> Then let's see what happens.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> 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: What exactly happens when I configure a different host

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Anand HS [mailto:anandhs@gmail.com]
> Subject: Re: What exactly happens when I configure a different host
>
> Thats exactly what I have.

Good.

> <Context path="" docBase="admin-web">
>  <Valve className="org.apache.catalina.valves.AccessLogValve"
>   directory="\\10.168.48.254\web_app_logs\QA1\Logs\SDQA1-WEB\TOMCAT\admin\accesslog"
>   prefix="localhost_access_log_admin."
>   suffix=".txt"
>   pattern="common" />
>  <Valve className="org.apache.catalina.valves.AccessLogValve"
>   directory="\\10.168.48.254\web_app_logs\QA1\Logs\SDQA1-WEB\TOMCAT\all\accesslog"
>   prefix="localhost_access_log."
>   suffix=".txt"
>   pattern="common" />
> </Context>

It's bad practice to put a <Context> element inside server.xml, especially for the default webapp.  You now have that webapp deployed twice, once as "", and again as "admin-web".  Before proceeding, change the name of the webapp directory from webapps/admin-web to webapps/ROOT (case-sensitive, even on Windows), and place the <Context> element in webapps/ROOT/META-INF/context.xml (also case-sensitive), but without the path and docBase attributes.  Delete any existing webapps/ROOT directory or webapps/ROOT.war file before renaming yours, of course.

Then let's see what happens.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
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: What exactly happens when I configure a different host

Posted by Anand HS <an...@gmail.com>.
Thats exactly what I have.

Here is the server.xml configuration  -

 <Service name="Tomcat-Standalone-Admin">

    <Connector     port="80" protocol="HTTP/1.1"
                connectionTimeout="20000"
                redirectPort="443"
                address="10.168.51.12"/>

    <Connector     port="443" address="10.168.51.12" protocol="HTTP/1.1"
SSLEnabled="true"
                maxThreads="150" scheme="https" secure="true"
                clientAuth="false" sslProtocol="TLS"
                keystoreFile="C:\Documents and
Settings\Administrator\admin.keystore"
                keystorePass="changeit" />

    <Engine name="Tomcat-Standalone-Admin" defaultHost="10.168.51.12">

    <Realm className="org.apache.catalina.realm.MemoryRealm" />
      <!-- Define the default virtual host
           Note: XML Schema validation will not work with Xerces 2.2.
       -->
      <Host name="10.168.51.12"  appBase="webapps"
            unpackWARs="true" autoDeploy="false"
            xmlValidation="false" xmlNamespaceAware="false">
        <Context path="" docBase="admin-web">

            <Valve     className="org.apache.catalina.valves.AccessLogValve"


directory="\\10.168.48.254\web_app_logs\QA1\Logs\SDQA1-WEB\TOMCAT\admin\accesslog"

                    prefix="localhost_access_log_admin."
                    suffix=".txt"
                    pattern="common" />
            <Valve     className="org.apache.catalina.valves.AccessLogValve"


directory="\\10.168.48.254\web_app_logs\QA1\Logs\SDQA1-WEB\TOMCAT\all\accesslog"

                    prefix="localhost_access_log."
                    suffix=".txt"
                    pattern="common" />
        </Context>

      </Host>
    </Engine>
  </Service>


Cheers-
Anand
On Mon, Dec 1, 2008 at 1:42 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Anand HS [mailto:anandhs@gmail.com]
> > Subject: What exactly happens when I configure a different host
> >
> > I noticed a strange behavior when I tried to configure a
> > virtual host by changing the Host Name in server.xml from
> > the default "localhost" to "mydomain.com".
>
> If that's all you did, then you have an invalid configuration, and all bets
> are off.  There must be one <Host> with a name attribute that matches the
> defaultHost attribute of the enclosing <Engine> element.
>
> Note that if you have only one <Host>, its name is unimportant other than
> it must be the same as the defaultHost setting.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> 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: What exactly happens when I configure a different host

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Anand HS [mailto:anandhs@gmail.com]
> Subject: What exactly happens when I configure a different host
>
> I noticed a strange behavior when I tried to configure a
> virtual host by changing the Host Name in server.xml from
> the default "localhost" to "mydomain.com".

If that's all you did, then you have an invalid configuration, and all bets are off.  There must be one <Host> with a name attribute that matches the defaultHost attribute of the enclosing <Engine> element.

Note that if you have only one <Host>, its name is unimportant other than it must be the same as the defaultHost setting.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
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