Where to put context.xml?

2005-09-13 Thread Michael Lai
This is probably an obvious question to most but I am new with tomcat 
5.5 so I am still trying to figure things out.  I want to create a web 
project with the document base in /home/tomcat/applications as opposed 
to the normal webapps folder.  This is what I have in my server.xml:


Server port=8005 shutdown=SHUTDOWN

 GlobalNamingResources
   !-- Used by Manager webapp --
   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=8081 /

   Engine name=Catalina defaultHost=localhost
 !-- Realm className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase / --
 Host name=localhost debug=0
   Context path= docBase=/home/tomcat/applications/
debug=0 reloadable=true /
 /Host
   /Engine
  
 /Service

/Server

It works when I point my browser to http://www.myhost.com:8081/ and it 
shows a customized welcome page from my index.jsp.  However, as I 
understand it, Context should now be in its own xml file.  I extracted 
the Context content and placed it in context.xml.  I placed 
context.xml in $CATALINA_HOME/conf/Catalina/localhost, restarted tomcat 
but now the browser shows nothing.  I also tried placing it in the conf/ 
folder but that doesn't work either.  Where does the file go?


Thanks for any help in advance.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Where to put context.xml?

2005-09-13 Thread Allistair Crossley
Nearly. Rename your file ROOT.xml and a path of /ROOT and you're away. The 
other alternative is create in your web application folder META-INF/context.xml

Allistair

 -Original Message-
 From: Michael Lai [mailto:[EMAIL PROTECTED]
 Sent: 13 September 2005 10:07
 To: tomcat-user@jakarta.apache.org
 Subject: Where to put context.xml?
 
 
 This is probably an obvious question to most but I am new with tomcat 
 5.5 so I am still trying to figure things out.  I want to 
 create a web 
 project with the document base in /home/tomcat/applications 
 as opposed 
 to the normal webapps folder.  This is what I have in my server.xml:
 
 Server port=8005 shutdown=SHUTDOWN
 
   GlobalNamingResources
 !-- Used by Manager webapp --
 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=8081 /
 
 Engine name=Catalina defaultHost=localhost
   !-- Realm 
 className=org.apache.catalina.realm.UserDatabaseRealm
  resourceName=UserDatabase / --
   Host name=localhost debug=0
 Context path= docBase=/home/tomcat/applications/
  debug=0 reloadable=true /
   /Host
 /Engine

   /Service
 /Server
 
 It works when I point my browser to 
http://www.myhost.com:8081/ and it 
shows a customized welcome page from my index.jsp.  However, as I 
understand it, Context should now be in its own xml file.  I extracted 
the Context content and placed it in context.xml.  I placed 
context.xml in $CATALINA_HOME/conf/Catalina/localhost, restarted tomcat 
but now the browser shows nothing.  I also tried placing it in the conf/ 
folder but that doesn't work either.  Where does the file go?

Thanks for any help in advance.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where to put context.xml?

2005-09-13 Thread Michael Lai

Allistair Crossley wrote:


Nearly. Rename your file ROOT.xml and a path of /ROOT and you're away. The 
other alternative is create in your web application folder META-INF/context.xml

Allistair



Thank you for your prompt replay, Allistair.  I choosed the second 
option and created the META folder.  So I now have:


/home/tomcat/applications/META-INF/context.xml

And my context.xml shows:

Context path= docBase=/home/tomcat/applications/
debug=0 reloadable=true 
/Context

I restarted tomcat but with the same effect.  Is there some other 
configuration that I have to modify to inform tomcat that I have a 
project in this folder?


Michael.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Where to put context.xml?

2005-09-13 Thread Allistair Crossley
Hi,

The docBase is just the folder where your web applications are located. You 
need to have a folder in applications for your web application. For the empty 
path application this is /ROOT.

Thus

Context path=/ROOT docBase=/home/tomcat/applications/
 debug=0 reloadable=true 
/Context

Means a folder at

/home/tomcat/applications/ROOT/META-INF/context.xml

applications

 -Original Message-
 From: Michael Lai [mailto:[EMAIL PROTECTED]
 Sent: 13 September 2005 10:21
 To: Tomcat Users List
 Subject: Re: Where to put context.xml?
 
 
 Allistair Crossley wrote:
 
 Nearly. Rename your file ROOT.xml and a path of /ROOT and 
 you're away. The other alternative is create in your web 
 application folder META-INF/context.xml
 
 Allistair
 
 
 Thank you for your prompt replay, Allistair.  I choosed the second 
 option and created the META folder.  So I now have:
 
 /home/tomcat/applications/META-INF/context.xml
 
 And my context.xml shows:
 
 Context path= docBase=/home/tomcat/applications/
  debug=0 reloadable=true 
 /Context
 
 I restarted tomcat but with the same effect.  Is there some other 
 configuration that I have to modify to inform tomcat that I have a 
 project in this folder?
 
 Michael.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Where to put context.xml?

2005-09-13 Thread Caldarale, Charles R
 From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
 Subject: RE: Where to put context.xml?
 
 Context path=/ROOT docBase=/home/tomcat/applications/
  debug=0 reloadable=true 
 /Context

To again quote from the Tomcat doc for the path attribute of the
Context element:

The value of this field must not be set except when statically defining
a Context in server.xml, as it will be infered [sic] from the filenames
used for either the .xml context file or the docBase.

Also note that placing Context tags is server.xml is strongly
discouraged.

 - 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: Where to put context.xml?

2005-09-13 Thread Allistair Crossley
Hi,

Thanks. I am pretty sure that earlier 5.5 implementations needed /ROOT 
specified for the older 5.0  empty path. Looks like it's either changed back 
to 5.0's method or I read something incorrectly,

Thanks in either case,

Allistair.

 -Original Message-
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Sent: 13 September 2005 14:25
 To: Tomcat Users List
 Subject: RE: Where to put context.xml?
 
 
  From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
  Subject: RE: Where to put context.xml?
  
  Context path=/ROOT docBase=/home/tomcat/applications/
   debug=0 reloadable=true 
  /Context
 
 To again quote from the Tomcat doc for the path attribute of the
 Context element:
 
 The value of this field must not be set except when 
 statically defining
 a Context in server.xml, as it will be infered [sic] from the 
 filenames
 used for either the .xml context file or the docBase.
 
 Also note that placing Context tags is server.xml is strongly
 discouraged.
 
  - 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]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where to put context.xml?

2005-09-13 Thread Michael Lai

Allistair Crossley wrote:


Hi,

The docBase is just the folder where your web applications are located. You 
need to have a folder in applications for your web application. For the empty 
path application this is /ROOT.

Thus

Context path=/ROOT docBase=/home/tomcat/applications/
debug=0 reloadable=true 
/Context

Means a folder at

/home/tomcat/applications/ROOT/META-INF/context.xml



Thanks, it works now.  I used your first method instead.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where to put context.xml?

2005-09-13 Thread Michael Lai

Caldarale, Charles R wrote:


To again quote from the Tomcat doc for the path attribute of the
Context element:

The value of this field must not be set except when statically defining
a Context in server.xml, as it will be infered [sic] from the filenames
used for either the .xml context file or the docBase.

Also note that placing Context tags is server.xml is strongly
discouraged.



OK, I took out /ROOT from the path field and it still works.  But the 
context file must still be named ROOT.xml.  The application fails to 
work with any other filename.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]