Re: What exactly happens when I configure a different host

2008-12-04 Thread Anand HS
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  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 <[EMAIL PROTECTED]> wrote:

> Caldarale, Charles R wrote:
>
>> From: Anand HS [mailto:[EMAIL PROTECTED]
>>> Subject: Re: What exactly happens when I configure a different host
>>>
>>> Does that mean when we change the , 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: What exactly happens when I configure a different host

2008-12-04 Thread André Warnier

Caldarale, Charles R wrote:

From: Anand HS [mailto:[EMAIL PROTECTED]
Subject: Re: What exactly happens when I configure a different host

Does that mean when we change the , 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: What exactly happens when I configure a different host

2008-12-03 Thread Caldarale, Charles R
> From: Anand HS [mailto:[EMAIL PROTECTED]
> Subject: Re: What exactly happens when I configure a different host
>
> Does that mean when we change the , 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What exactly happens when I configure a different host

2008-12-03 Thread Anand HS
Whew.. that was a problem alright..
Does that mean when we change the , 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 <
[EMAIL PROTECTED]> wrote:

> > From: Anand HS [mailto:[EMAIL PROTECTED]
> > Subject: Re: What exactly happens when I configure a different host
> >
> > I changed the  Name and  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  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  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
>  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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: What exactly happens when I configure a different host

2008-12-03 Thread Caldarale, Charles R
> From: Anand HS [mailto:[EMAIL PROTECTED]
> Subject: Re: What exactly happens when I configure a different host
>
> I changed the  Name and  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  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  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  
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What exactly happens when I configure a different host

2008-12-01 Thread Anand HS
Yes.
I changed the  Name and  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 <
[EMAIL PROTECTED]> wrote:

> > From: Anand HS [mailto:[EMAIL PROTECTED]
> > 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  name and the  defaultHost
> setting back to localhost now that you have the webapp properly named and
> the  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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: What exactly happens when I configure a different host

2008-12-01 Thread Caldarale, Charles R
> From: Anand HS [mailto:[EMAIL PROTECTED]
> 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  name and the  defaultHost setting 
back to localhost now that you have the webapp properly named and the  
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What exactly happens when I configure a different host

2008-12-01 Thread Anand HS
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 <
[EMAIL PROTECTED]> wrote:

> > From: Anand HS [mailto:[EMAIL PROTECTED]
> > Subject: Re: What exactly happens when I configure a different host
> >
> > Here is the web.xml from my webapp -
> >
> > 
> >  action
> >  com.psi.servlet.Log4jInitializerServlet
> >  
> >   debug
> >   2
> >  
> >  2
> > 
>
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: What exactly happens when I configure a different host

2008-12-01 Thread Caldarale, Charles R
> From: Anand HS [mailto:[EMAIL PROTECTED]
> Subject: Re: What exactly happens when I configure a different host
>
> Here is the web.xml from my webapp -
>
> 
>  action
>  com.psi.servlet.Log4jInitializerServlet
>  
>   debug
>   2
>  
>  2
> 

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What exactly happens when I configure a different host

2008-12-01 Thread Anand HS
   png
image/png


qti
image/x-quicktime


qtif
image/x-quicktime


swf
application/x-shockwave-flash


dtd
text/plain


xls
application/vnd.ms-excel


xls
application/x-msexcel


ppt
application/vnd.ms-powerpoint


ppt
application/x-mspowerpoint





On Mon, Dec 1, 2008 at 7:33 PM, Caldarale, Charles R <
[EMAIL PROTECTED]> wrote:

> > From: Anand HS [mailto:[EMAIL PROTECTED]
> > 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
>  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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: What exactly happens when I configure a different host

2008-12-01 Thread Caldarale, Charles R
> From: Anand HS [mailto:[EMAIL PROTECTED]
> 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 
 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What exactly happens when I configure a different host

2008-12-01 Thread Anand HS
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 <
[EMAIL PROTECTED]> wrote:

> > From: Anand HS [mailto:[EMAIL PROTECTED]
> > 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: What exactly happens when I configure a different host

2008-12-01 Thread Caldarale, Charles R
> From: Anand HS [mailto:[EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What exactly happens when I configure a different host

2008-12-01 Thread Anand HS
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



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 <
[EMAIL PROTECTED]> wrote:

> > From: Anand HS [mailto:[EMAIL PROTECTED]
> > Subject: Re: What exactly happens when I configure a different host
> >
> > Thats exactly what I have.
>
> Good.
>
> > 
> >   >   directory="\\10.168.48.254
> \web_app_logs\QA1\Logs\SDQA1-WEB\TOMCAT\admin\accesslog"
> >   prefix="localhost_access_log_admin."
> >   suffix=".txt"
> >   pattern="common" />
> >   >   directory="\\10.168.48.254
> \web_app_logs\QA1\Logs\SDQA1-WEB\TOMCAT\all\accesslog"
> >   prefix="localhost_access_log."
> >   suffix=".txt"
> >   pattern="common" />
> > 
>
> It's bad practice to put a  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  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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: What exactly happens when I configure a different host

2008-12-01 Thread Caldarale, Charles R
> From: Anand HS [mailto:[EMAIL PROTECTED]
> Subject: Re: What exactly happens when I configure a different host
>
> Thats exactly what I have.

Good.

> 
> 
> directory="\\10.168.48.254\web_app_logs\QA1\Logs\SDQA1-WEB\TOMCAT\admin\accesslog"
>   prefix="localhost_access_log_admin."
>   suffix=".txt"
>   pattern="common" />
> 
> directory="\\10.168.48.254\web_app_logs\QA1\Logs\SDQA1-WEB\TOMCAT\all\accesslog"
>   prefix="localhost_access_log."
>   suffix=".txt"
>   pattern="common" />
> 

It's bad practice to put a  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  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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What exactly happens when I configure a different host

2008-12-01 Thread Anand HS
Thats exactly what I have.

Here is the server.xml configuration  -

 








  
  






  

  


Cheers-
Anand
On Mon, Dec 1, 2008 at 1:42 PM, Caldarale, Charles R <
[EMAIL PROTECTED]> wrote:

> > From: Anand HS [mailto:[EMAIL PROTECTED]
> > 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  with a name attribute that matches the
> defaultHost attribute of the enclosing  element.
>
> Note that if you have only one , 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: What exactly happens when I configure a different host

2008-12-01 Thread Caldarale, Charles R
> From: Anand HS [mailto:[EMAIL PROTECTED]
> 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  with a name attribute that matches the 
defaultHost attribute of the enclosing  element.

Note that if you have only one , 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



What exactly happens when I configure a different host

2008-12-01 Thread Anand HS
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