Fw: problem with getcontext and context.xml

2006-10-29 Thread BRUN Sébastien

Hi, i am new to tomcat and i have two problem :
first one in a tomcat 5.5.9 when i use the  request.getServletPath() and 
request.getContextPath()
i get different answer than a tomcat 5.5.19 (or 20), has this function 
change in the new tomcat?


Second question and the more important is how to use the server.xml and 
context.xml to work together

here is my problem :

i would like to setup a virtual host on tomcat, so i put on my server.xml 
file this :

Host name=vhost1.mydomain.com debug=0
appBase=/usr/local/tomcat/webapps/myaccount/
unpackWARs=true  autoDeploy=true
/Host

and on
/usr/local/tomcat/webapps/myaccount/META-INF/context.xml :
Context path= docBase= override=true
/Context

I have try many different things (docBase=myaccount etc)
but i always get the same answer :
Alert!: HTTP/1.1 400 No Host matches server name vhost1.mydomain.com

does anybody can help ?
Regards 
   


-
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: problem with getcontext and context.xml

2006-10-29 Thread Caldarale, Charles R
 From: BRUN Sébastien [mailto:[EMAIL PROTECTED] 
 Subject: Fw: problem with getcontext and context.xml
 
 i would like to setup a virtual host on tomcat

If you only have one host to worry about, you don't need to use virtual hosts.  
You can also use the alias attribute if you have multiple domains to support 
with identical apps.

 Host name=vhost1.mydomain.com debug=0
 appBase=/usr/local/tomcat/webapps/myaccount/

The above is incorrect.  The appBase parameter should point to the directory in 
which your webapps are deployed, not to a specific webapp.

 /usr/local/tomcat/webapps/myaccount/META-INF/context.xml :
 Context path= docBase= override=true
 /Context

When the Context element is in META-INF/context.xml, the path and docBase 
attributes must not be used, since they are derivable from the location of the 
app.  If you want myaccount to be the default webapp for the Host, change 
its name (subdirectory) to ROOT (case sensitive).  Read some of this weekend's 
messages for more detail, especially this one:
http://marc.theaimsgroup.com/?l=tomcat-userm=116198740004759w=2

 Alert!: HTTP/1.1 400 No Host matches server name vhost1.mydomain.com

What is the defaultHost attribute set to in your Engine?

 - 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: problem with getcontext and context.xml

2006-10-29 Thread mast

Yes but i have multiple vhost for different webapps.
I have try to put Host name=vhost1.mydomain.com debug=0 
appBase=/usr/local/tomcat/webapps/ like you suggest but when i launch 
tomcat it seem that i only get the ROOT webapps, and how can the server know 
that vhost1.mydomain.com is for /usr/local/tomcat/webapps/myaccount for 
exemple
and vhost2.mydomain.com to myaccount2 if i only write appbase to where my 
webapps are deployed?


Ok for the path and docBase so the context.xml is somethink like :
Context reloadable=true / only ?

the defaultHost attribute is default.mydomain.com only.

I have read the 
http://marc.theaimsgroup.com/?l=tomcat-userm=116198740004759w=2 and i have 
deploy a default website in ROOT (with a META-INF/context.xml) but none of 
my websites work.


So i have in the server.xml :

Engine name=Catalina defaultHost=default.mydomain.com
Host name=vhost1.mydomain.com debug=0
appBase=/usr/local/tomcat/webapps/
unpackWARs=true  autoDeploy=true
/Host
Host name=vhost2.mydomain.com debug=0
appBase=/usr/local/tomcat/webapps/
unpackWARs=true  autoDeploy=true
/Host

and in /usr/local/tomcat/webapps/ROOT/META-INF/context.xml
   /usr/local/tomcat/webapps/myaccount1//META-INF/context.xml
/usr/local/tomcat/webapps/myaccount2//META-INF/context.xml
Context reloadable=true /
WatchedResourceWEB-INF/web.xml/WatchedResource (taken from internet don 
t know if it s necessary)


And nothing works , for default.mydomain.com i get : HTTP/1.1 400 No Host 
matches server name default.mydomain.com

for vhost1.mydomain.com i get only a 404 error

What i am doing wrong ? and in this configuration how can the server know 
that vhost2 is for myaccount2 and vhost1 for myaccount1 for example ?

thanks for your help






- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, October 29, 2006 4:27 PM
Subject: RE: problem with getcontext and context.xml



From: BRUN Sébastien [mailto:[EMAIL PROTECTED]
Subject: Fw: problem with getcontext and context.xml

i would like to setup a virtual host on tomcat


If you only have one host to worry about, you don't need to use virtual 
hosts.  You can also use the alias attribute if you have multiple domains to 
support with identical apps.



Host name=vhost1.mydomain.com debug=0
appBase=/usr/local/tomcat/webapps/myaccount/


The above is incorrect.  The appBase parameter should point to the directory 
in which your webapps are deployed, not to a specific webapp.



/usr/local/tomcat/webapps/myaccount/META-INF/context.xml :
Context path= docBase= override=true
/Context


When the Context element is in META-INF/context.xml, the path and docBase 
attributes must not be used, since they are derivable from the location of 
the app.  If you want myaccount to be the default webapp for the Host, 
change its name (subdirectory) to ROOT (case sensitive).  Read some of this 
weekend's messages for more detail, especially this one:

http://marc.theaimsgroup.com/?l=tomcat-userm=116198740004759w=2


Alert!: HTTP/1.1 400 No Host matches server name vhost1.mydomain.com


What is the defaultHost attribute set to in your Engine?

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



-
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: problem with getcontext and context.xml

2006-10-29 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: problem with getcontext and context.xml
 
 Yes but i have multiple vhost for different webapps.
 how can the server know that vhost1.mydomain.com is for 
 /usr/local/tomcat/webapps/myaccount for exemple
 and vhost2.mydomain.com to myaccount2

If you want different default apps for each host, you need to have
different appBase settings for each, and each appBase would have its own
ROOT subdirectory (or .war file).  Alternatively, you could put separate
ROOT.xml files in conf/[engine]/[host] for each host, each ROOT.xml
pointing to the proper default app via the docBase attribute.  You would
probably want to turn off autoDeploy and deployOnStartup in this case.

 Ok for the path and docBase so the context.xml is somethink like :
 Context reloadable=true / only ?

Correct.

 the defaultHost attribute is default.mydomain.com only.

Then where is the Host entry for default.mydomain.com?  If it's
missing, it's surprising Tomcat does anything.

 And nothing works , for default.mydomain.com i get : HTTP/1.1 
 400 No Host matches server name default.mydomain.com
 for vhost1.mydomain.com i get only a 404 error

Which is what you should get, since you don't have a Host entry for
it.

 - 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: problem with getcontext and context.xml

2006-10-29 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: problem with getcontext and context.xml
 
 Host name=vhost1.mydomain.com debug=0
 appBase=/usr/local/tomcat/webapps/myaccount1
 unpackWARs=true  autoDeploy=true
 Context path= docBase= debug=1 reloadable=true /
  /Host
 Host name=vhost2.mydomain.com debug=0
 appBase=/usr/local/tomcat/webapps/myaccount2
 unpackWARs=true  autoDeploy=true
 Context path= docBase= debug=1 reloadable=true /
  /Host

But since the Context is in server.xml, you can't change anything
without restarting Tomcat.  This is why doing so is strongly
discouraged.  Even the above is not correct, since appBase is pointing
to a specific webapp, rather than the default location for all webapps
for the Host.  When you violate the intent of the configuration
settings, you're at risk of your settings failing miserably at any time.

 now you told me to have multiple appbase ? so it s not 
 the same things 
 as : appBase=/usr/local/tomcat/webapps/myaccount1 ? and appbase 
 appBase=/usr/local/tomcat/webapps/myaccount2 for the two context ?

 and to have a hierarchy like this :
 /usr/local/tomcat/webapps/myaccount1/ROOT/ (where to put my website?)
 /usr/local/tomcat/webapps/myaccount2/ROOT/  ?

You could do that, but it's an extra directory layer that you don't
really need.  I'd suggest this instead:
appBase=/usr/local/tomcat/webapps1
appBase=/usr/local/tomcat/webapps2
and put your default app for each host in:
/usr/local/tomcat/webapps1/ROOT
/usr/local/tomcat/webapps2/ROOT
where one Host's appBase points to webapps1, and the other to
webapps2.  Note that the names myaccount1 and myaccount2 serve no
purpose and have been removed.

 it seem much more complicated than to have the context in the 
 server.xml file no ?

No, because it makes the app deployment independent of the Tomcat
configuration.

 i would prefer in the META-INF for each user to manage it s 
 own context.xml 

Agreed, that is the more desirable setup.

 it s there : Engine name=Catalina 
 defaultHost=default.mydomain.com
 no ?

No; you're missing the Host name=default.mydomain.com ... entry in
your server.xml.  Read the doc:
Exactly one of the Hosts associated with each Engine MUST have a name
matching the defaultHost attribute of that Engine.
http://tomcat.apache.org/tomcat-5.5-doc/config/host.html

 Right now my hierarchy is like this :
 /usr/local/tomcat/webapps/myaccount1/META-INF/context.xml
 usr/local/tomcat/webapps/myaccount1/WEB-INF/web.xml
 /usr/local/tomcat/webapps/myaccount2/META-INF/context.xml
 usr/local/tomcat/webapps/myaccount2/WEB-INF/web.xml

Again, you should separate the webapps of the two hosts, and use ROOT
for the default app for each:
/usr/local/tomcat/webapps1/ROOT/META-INF/context.xml
/usr/local/tomcat/webapps1/ROOT/WEB-INF/web.xml
/usr/local/tomcat/webapps2/ROOT/META-INF/context.xml
/usr/local/tomcat/webapps2/ROOT/WEB-INF/web.xml
The appBase attributes for the two Host elements should point to
/usr/local/tomcat/webapps1 and /usr/local/tomcat/webapps2,
respectively.

 - 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: problem with getcontext and context.xml

2006-10-29 Thread mast
Hmm i think i understand a little so each context need to have it's own ROOT 
directory (it would be much simplier without it :) )
for the Host name=default.mydomain.com ...  i forget it yes.

So i have create like you told two things :
Host name=default.mydomain.com 
and 
Host name=vhost1.mydomain.com debug=0
appBase=/usr/local/tomcat/webapps/myaccount1


and i have /usr/local/tomcat/webapps/ROOT/META-INF/context.xml
and /usr/local/tomcat/webapps/test/ROOT/META-INF/context.xml

i am write?
well the problem now is that i always get :
 Status report
message /

description The requested resource (/) is not available.

my website is in the directory ROOT on both case (with a ROOT/META-INF and a 
ROOT/WEB-INF for both), what i am doingt wrong this time?

thx


RE: problem with getcontext and context.xml

2006-10-29 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: problem with getcontext and context.xml
 
 Hmm i think i understand a little so each context need to 
 have it's own ROOT directory

No; perhaps you don't understand that context is synonomous with webapp,
not host.  Each Host should have its own appBase and ROOT context,
unless you want the same apps running on both Hosts.  ROOT is simply
the default context; there can be many contexts (webapps) for each
Host.

 So i have create like you told two things :
 Host name=default.mydomain.com 
 and 
 Host name=vhost1.mydomain.com debug=0
 appBase=/usr/local/tomcat/webapps/myaccount1
 and i have /usr/local/tomcat/webapps/ROOT/META-INF/context.xml
 and /usr/local/tomcat/webapps/test/ROOT/META-INF/context.xml

No, you're not paying attention to what's in the messages.  To repeat
from the last time:

You could do that, but it's an extra directory layer that you don't
really need.  I'd suggest this instead:
appBase=/usr/local/tomcat/webapps1
appBase=/usr/local/tomcat/webapps2
and put your default app for each host in:
/usr/local/tomcat/webapps1/ROOT
/usr/local/tomcat/webapps2/ROOT
where one Host's appBase points to webapps1, and the other to
webapps2.  Note that the names myaccount1 and myaccount2 serve no
purpose and have been removed.

By the way, you don't need a Host entry for default.mydomain.com,
unless you have a separate set of apps for default.mydomain.com; you
could simply declare vhost1.mydomain.com or vhost2.mydomain.com as the
defaultHost for your engine.

 - 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: problem with getcontext and context.xml

2006-10-29 Thread mast

Well each one of my host have their own appBase and ROOT context
in each host i haveappBase=/usr/local/tomcat/webapps1 and 
appBase=/usr/local/tomcat/webapps2
and i have put my website in : /usr/local/tomcat/webapps1/ROOT/myfile (and 
same for webapps2)

anything wrong on this ? i despair to make it work


-
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: problem with getcontext and context.xml

2006-10-29 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: problem with getcontext and context.xml
 
 Well each one of my host have their own appBase and ROOT context
 in each host i haveappBase=/usr/local/tomcat/webapps1 and 
 appBase=/usr/local/tomcat/webapps2

That's good.

 and i have put my website in : 
 /usr/local/tomcat/webapps1/ROOT/myfile (and 
 same for webapps2)

Take out the myfile - your default app is ROOT.  Stop adding unnecessary
directories.  The WEB-INF and META-INF directories should be immediately
under each ROOT directory.

 - 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: problem with getcontext and context.xml

2006-10-29 Thread mast

when i say myfile i mean file like index.jsp it their i should put them no ?
actually the META inf and WEB inf are immediately under the ROOT directory 
but that don t work
- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, October 29, 2006 8:19 PM
Subject: RE: problem with getcontext and context.xml



From: mast [mailto:[EMAIL PROTECTED]
Subject: Re: problem with getcontext and context.xml

Well each one of my host have their own appBase and ROOT context
in each host i haveappBase=/usr/local/tomcat/webapps1 and
appBase=/usr/local/tomcat/webapps2


That's good.


and i have put my website in :
/usr/local/tomcat/webapps1/ROOT/myfile (and
same for webapps2)


Take out the myfile - your default app is ROOT.  Stop adding unnecessary
directories.  The WEB-INF and META-INF directories should be immediately
under each ROOT directory.

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



-
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: problem with getcontext and context.xml

2006-10-29 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: problem with getcontext and context.xml
 
 when i say myfile i mean file like index.jsp it their i 
 should put them no ?

Yes, that's where the public .jsp files should go.

 but that don t work

What do you mean by don't work?  What happens when you enter
http://vhost1.mydomain.com or http://vhost2.mydomain.com in a browser?
What's in the Tomcat logs?  Post your server.xml and each ROOT's
context.xml if the logs don't help.

 - 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: problem with getcontext and context.xml

2006-10-29 Thread mast

Well there is nothing on the log.
Here is my server.xml :
Server port=8005 shutdown=SHUTDOWN
!-- Global JNDI resources --
 GlobalNamingResources

   !-- Test entry for demonstration purposes --
   Environment name=simpleValue type=java.lang.Integer value=30/
   Resource name=UserDatabase auth=Container
 type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
 pathname=conf/tomcat-users.xml /

 /GlobalNamingResources

 Service name=Catalina

   Connector port=9570
  enableLookups=false redirectPort=8443 protocol=AJP/1.3 
/
   Engine name=Catalina defaultHost=myvhost1.althosting.net 
appBase=webapps/mydomain1


 Realm className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase/

Host name=myvhost2.mydomain.com appBase=webapps/mydomain2 
unpackWARs=true  autoDeploy=true /

   /Engine

 /Service

/Server



the context.xml :
/usr/local/tomcat/webapps/ROOT/META-INF/context.xml
Context reloadable=true /
WatchedResourceWEB-INF/web.xml/WatchedResource



/usr/local/tomcat/webapps1/ROOT/META-INF/context.xml
Context reloadable=true /
WatchedResourceWEB-INF/web.xml/WatchedResource


for myvhost2 i get error 404
for myvhost1 i get  No Host matches server name

- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, October 29, 2006 8:29 PM
Subject: RE: problem with getcontext and context.xml



From: mast [mailto:[EMAIL PROTECTED]
Subject: Re: problem with getcontext and context.xml

when i say myfile i mean file like index.jsp it their i
should put them no ?


Yes, that's where the public .jsp files should go.


but that don t work


What do you mean by don't work?  What happens when you enter
http://vhost1.mydomain.com or http://vhost2.mydomain.com in a browser?
What's in the Tomcat logs?  Post your server.xml and each ROOT's
context.xml if the logs don't help.

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



-
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: problem with getcontext and context.xml

2006-10-29 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: problem with getcontext and context.xml
 
 Connector port=9570 enableLookups=false
redirectPort=8443 protocol=AJP/1.3 /

This would indicate you're front-ending Tomcat with something else, such
as httpd.  Add a Connector for a different port and
protocol=HTTP/1.1, then see what happens when you contact Tomcat
directly via that port.

 - 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: problem with getcontext and context.xml

2006-10-29 Thread mast
Yes that s the case i use apache , i have try with http/1.1 and another port 
but i get exactly the same problem for the two hosts


- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, October 29, 2006 9:10 PM
Subject: RE: problem with getcontext and context.xml



From: mast [mailto:[EMAIL PROTECTED]
Subject: Re: problem with getcontext and context.xml

Connector port=9570 enableLookups=false
   redirectPort=8443 protocol=AJP/1.3 /



This would indicate you're front-ending Tomcat with something else, such
as httpd.  Add a Connector for a different port and
protocol=HTTP/1.1, then see what happens when you contact Tomcat
directly via that port.



- Chuck





-
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: problem with getcontext and context.xml

2006-10-29 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: problem with getcontext and context.xml
 
 i have try with http/1.1 and another port but i get 
 exactly the same problem for the two hosts

Do you have DNS entries for both host names?  What IP address does each
evaluate to?  (Hint: they must be different.)

 - 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: problem with getcontext and context.xml

2006-10-29 Thread mast
Well i have DNS entrie for both but i have only 1 IP so it s the same 
entries , both vhost have the same IP (that s why their are vhost :) )


- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, October 29, 2006 9:23 PM
Subject: RE: problem with getcontext and context.xml



From: mast [mailto:[EMAIL PROTECTED]
Subject: Re: problem with getcontext and context.xml

i have try with http/1.1 and another port but i get
exactly the same problem for the two hosts


Do you have DNS entries for both host names?  What IP address does each
evaluate to?  (Hint: they must be different.)

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



-
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: problem with getcontext and context.xml

2006-10-29 Thread mast

there is one error i hadn't notice  :

SEVERE: Parse Fatal Error at line 2 column 2: The markup in the document 
following the root element must be well-formed.
org.xml.sax.SAXParseException: The markup in the document following the root 
element must be well-formed.


Oct 29, 2006 9:34:17 PM org.apache.catalina.startup.ContextConfig 
processContextConfig

SEVERE: Parse error in default web.xml
org.xml.sax.SAXParseException: The markup in the document following the root 
element must be well-formed.



but that s the default web.xml that come with tomcat


-
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: problem with getcontext and context.xml

2006-10-29 Thread mast
if i delete the context.xml file it seem to work is there anything wrong in 
:

Context reloadable=true /
WatchedResourceWEB-INF/web.xml/WatchedResource
? 



-
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: problem with getcontext and context.xml

2006-10-29 Thread Mark Thomas
mast wrote:
 if i delete the context.xml file it seem to work is there anything wrong
 in :
 Context reloadable=true /
 WatchedResourceWEB-INF/web.xml/WatchedResource

Yes. It should be:
Context reloadable=true 
WatchedResourceWEB-INF/web.xml/WatchedResource
/Context

Mark

-
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: problem with getcontext and context.xml

2006-10-29 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: problem with getcontext and context.xml
 
 Well i have DNS entrie for both but i have only 1 IP so it s the same 
 entries , both vhost have the same IP (that s why their are vhost :) )

Yes, that should work - I've just verified it with my 5.5.20
installation.  Here's my server.xml, with most of the comments stripped
out:

Server port=8005 shutdown=SHUTDOWN
  Listener
className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
/
  Listener
className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener
/
  GlobalNamingResources
Environment name=simpleValue type=java.lang.Integer
value=30/
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
   factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
  /GlobalNamingResources
  Service name=Catalina
Connector port=8080 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false redirectPort=8443
acceptCount=100
   connectionTimeout=2 disableUploadTimeout=true /
Connector port=8009 
   enableLookups=false redirectPort=8443
protocol=AJP/1.3 /
Engine name=Catalina defaultHost=myhost1.com
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
  Host name=myhost1.com appBase=webapps1
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
Valve
className=org.apache.catalina.valves.FastCommonAccessLogValve
 directory=logs prefix=myhost1.com_access_log.
suffix=.log
 pattern=common resolveHosts=false/
  /Host
  Host name=myhost2.com appBase=webapps2
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
Valve
className=org.apache.catalina.valves.FastCommonAccessLogValve
 directory=logs prefix=myhost2.com_access_log.
suffix=.log
 pattern=common resolveHosts=false/
  /Host
/Engine
  /Service
/Server

All servlet and JSP examples work properly, and differentiate properly
between myhost1 and myhost2.

 - 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: problem with getcontext and context.xml

2006-10-29 Thread mast
Hmm yes in fact that work better with the /Context 
thanks for the help to both of you it works now
- Original Message - 
From: Mark Thomas [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, October 29, 2006 10:05 PM
Subject: Re: problem with getcontext and context.xml



mast wrote:

if i delete the context.xml file it seem to work is there anything wrong
in :
Context reloadable=true /
WatchedResourceWEB-INF/web.xml/WatchedResource


Yes. It should be:
Context reloadable=true 
WatchedResourceWEB-INF/web.xml/WatchedResource
/Context

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]