Re: default context

2012-06-28 Thread James Lampert

David kerber wrote:
If I'm not mistaken (which is definitely possible), if you name it 
ROOT.war, it will also become the default context.


Quite true. Even a neophyte like me is aware of that. ;-p

(And there's a lot more about Tomcat that I *don't* know, than there is 
that I *do* -- it was just this month that I learned, for example, that 
on an AS/400, you not only need Java 6 for Tomcat 7, you need a specific 
Java 6, and also that you can set up the environment variables from the 
CL program that launches Tomcat, rather than having to mess with 
startup.sh or catalina.sh, or create a setenv.sh.)


--
JHHL

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



Re: default context

2012-06-28 Thread David kerber

On 6/28/2012 3:20 PM, chad.da...@emc.com wrote:

As I read the context docs ( 
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html ), the only way to 
define a default web application is via a context element in the server.xml 
file.  Is this true?  So, this means that it is IMPOSSIBLE to drop a default 
web app WAR into the webapps folder, correct?




If I'm not mistaken (which is definitely possible), if you name it 
ROOT.war, it will also become the default context.


D


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



default context

2012-06-28 Thread Chad.Davis
As I read the context docs ( 
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html ), the only way to 
define a default web application is via a context element in the server.xml 
file.  Is this true?  So, this means that it is IMPOSSIBLE to drop a default 
web app WAR into the webapps folder, correct?



Fwd: Cant start stop the default context in a virtual host

2010-02-23 Thread James McArthur
Hi

I have been using Tomcat for years since 3 till 6 but I have never worked
this one out

I have several  in my engine each with a manager

I have web apps intalled including a website in the ROOT context ( e.g.  /
) for each host

If you try and start or stop the / context it says no such context exist (
although it really does ). Any other webapp can be started/stopped inside
this host just not the ROOT one

Only solutions is to start stop the server which kills off the other
connections to other hosts

Can it be done

Thanks

J


RE: Changing default context path

2009-05-18 Thread Caldarale, Charles R
> From: Yaakov Chaikin [mailto:yaakov.chai...@gmail.com]
> Subject: Re: Changing default context path
> 
> So, is it telling me that I can place bla.xml into META-INF 
> directory with a  tag in it and the context path
> will change to /bla? I tried that and it didn't work.

No, when inside the webapp, the  element must be in 
META-INF/context.xml.

> So, are you saying that there is NO way (outside of configuring a
>  inside the server.xml) to have the name of the WAR file
> be one thing and the context path be something else?

You can keep the webapp outside of the  appBase directory (Tomcat's 
webapps directory, by default), and place the  element for it in 
conf/Catalina/[host]/[appName].xml, with a docBase attribute pointing to the 
actual location of the .war file (or directory).  You still do not use the path 
attribute; the URL path to the webapp is determined by the name of the .xml 
file.

> I am looking for a way to carry the context path information 
> inside the WAR itself due to my build process requirements.

You could easily have your deployment script change the name of the .war file 
when it's copied to the appBase 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Changing default context path

2009-05-18 Thread Pid
Caldarale, Charles R wrote:
> The path attribute is not allowed except in circumstances that are strongly 
> discouraged.  

Can I suggest an amendment to the documentation as follows:

- If you specify a context path of an empty string (""), you are
- defining the default web application for this Host, which will

+ If you specify a context path you must be able to prove the Riemann
+ hypothesis.


p




>  - 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-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 


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



Re: Changing default context path

2009-05-18 Thread Yaakov Chaikin
On Mon, May 18, 2009 at 4:46 PM, Caldarale, Charles R
 wrote:
>
> > From: Yaakov Chaikin [mailto:yaakov.chai...@gmail.com]
> > Subject: Re: Changing default context path
> >
> > Take a look at 5th bullet.
>
> Take a look at the description of the path attribute, which you seem to be 
> ignoring:
>
> "The value of this field must not be set except when statically defining a 
> Context in server.xml, as it will be inferred from the filenames used for 
> either the .xml context file or the docBase."

Oops... I guess, I missed that part... But it does say that the
context path is inferred from .xml context file... So, is it telling
me that I can place bla.xml into META-INF directory with a 
tag in it and the context path will change to /bla? I tried that and
it didn't work.

So, are you saying that there is NO way (outside of configuring a
 inside the server.xml) to have the name of the WAR file
be one thing and the context path be something else? I am looking for
a way to carry the context path information inside the WAR itself due
to my build process requirements.

> I already told you.  You need to read all of the doc, not just the parts that 
> please you.

Ouch. Man! Lower you weapon. Just asking a question. (I did have the
"audacity" of missing part of the documentation.)

Thanks for your help,
Yaakov.

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



RE: Changing default context path

2009-05-18 Thread Caldarale, Charles R
> From: Yaakov Chaikin [mailto:yaakov.chai...@gmail.com]
> Subject: Re: Changing default context path
> 
> Take a look at 5th bullet.

Take a look at the description of the path attribute, which you seem to be 
ignoring:

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

> I am just trying to figure out why that doesn't seem to work for me.

I already told you.  You need to read all of the doc, not just the parts that 
please you.

 - 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Changing default context path

2009-05-18 Thread Yaakov Chaikin
Hmm... the documentation seems to disagree with you:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

Take a look at 5th bullet.

I am just trying to figure out why that doesn't seem to work for me.

Yaakov.

On Mon, May 18, 2009 at 4:34 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Yaakov Chaikin [mailto:yaakov.chai...@gmail.com]
> > Subject: Changing default context path
> >
> > Tomcat still defaults to the WAR file name as the context path...
>
> That's how it's defined to work.  The path attribute is not allowed except
> in circumstances that are strongly discouraged.  Change the name of your
> .war file.
>
>  - 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-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: Changing default context path

2009-05-18 Thread Caldarale, Charles R
> From: Yaakov Chaikin [mailto:yaakov.chai...@gmail.com]
> Subject: Changing default context path
> 
> Tomcat still defaults to the WAR file name as the context path...

That's how it's defined to work.  The path attribute is not allowed except in 
circumstances that are strongly discouraged.  Change the name of your .war file.

 - 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Changing default context path

2009-05-18 Thread Yaakov Chaikin
Hi,

I am trying to deploy a WAR with a custom context path. For some reason,
Tomcat still defaults to the WAR file name as the context path...

What I am doing is placing context.xml inside the blah.war under
META-INF/context.xml. Here are the contents of context.xml:
**



***

For some reason, Tomcat still deploys the blah.war application to /blah, not
to /test.


Re: Add URLClassLoader search path to default context classloader

2007-12-21 Thread Bill Barker

"lightbulb432" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> In a web application that loads resources expecting them to be available 
> on
> the classpath (e.g. ResourceBundle.getInstance("resource")), is there a 
> way
> to alter what locations the web context classloader includes?
>

Not from the configuration alone, unless you are happy to add it to the 
'common' or 'shared' loader (and, yes, the shared loader exists in TC 6, it 
just doesn't do anything by default).

Otherwise, the only way is to create a custom Loader that calls 
addRepository on the WebAppClassLoader with the external location (as a URL 
string).  Note that custom Loaders aren't as well supported as other custom 
classes at the moment, so this may require additional coding to get it to 
work (i.e. the parent classloader isn't automagically assigned).

> I'd like to add a URL to the search path of the web context classloader, 
> so
> that in the above example, resource.properties from some URL is seen by 
> the
> web application. I know that URLs can be made available to a classloader 
> by
> using URLClassLoader. However, I don't know how I can include the search
> path of that classloader in the web application's classloader provided by
> Tomcat. How can I do this?
>
> Thanks.
> -- 
> View this message in context: 
> http://www.nabble.com/Add-URLClassLoader-search-path-to-default-context-classloader-tp14458477p14458477.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> -
> 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]



Add URLClassLoader search path to default context classloader

2007-12-21 Thread lightbulb432

In a web application that loads resources expecting them to be available on
the classpath (e.g. ResourceBundle.getInstance("resource")), is there a way
to alter what locations the web context classloader includes?

I'd like to add a URL to the search path of the web context classloader, so
that in the above example, resource.properties from some URL is seen by the
web application. I know that URLs can be made available to a classloader by
using URLClassLoader. However, I don't know how I can include the search
path of that classloader in the web application's classloader provided by
Tomcat. How can I do this?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Add-URLClassLoader-search-path-to-default-context-classloader-tp14458477p14458477.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
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: How to specify a default context?

2007-10-02 Thread Caldarale, Charles R
> From: Szabolcs Márton [mailto:[EMAIL PROTECTED] 
> Subject: Re: How to specify a default context?
> 
> maybe try this, in server.xml, in tomcat6
> 

Please read the docs before posting.  In current versions of Tomcat, do not 
ever put  elements inside server.xml.  Do it the documented way, and 
save yourself a lot of headaches.

 - 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: How to specify a default context?

2007-10-02 Thread Szabolcs Márton
Hi

maybe try this, in server.xml, in tomcat6



after this, every request at http://host will served by the context you
specified here.
No any changes neccessary, as i remember.

regards
Szabi



2007/9/30, Caldarale, Charles R <[EMAIL PROTECTED]>:
>
> > From: Ken Bowen [mailto:[EMAIL PROTECTED]
> > Subject: Re: How to specify a default context?
> >
> > Since I plan to use http://tuckey.org/urlrewrite/ to
> > rewrite URLs, and since "/" will rewrite to "/myapp/",
> > then the request htpp://myhost/ will ending up causing
> > myapp to handle the request.
>
> Yes, using a filter or valve to forward or redirect requests to the
> desired URI should work.
>
> - 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: How to specify a default context?

2007-09-30 Thread Caldarale, Charles R
> From: Ken Bowen [mailto:[EMAIL PROTECTED] 
> Subject: Re: How to specify a default context?
> 
> Since I plan to use http://tuckey.org/urlrewrite/ to 
> rewrite URLs, and since "/" will rewrite to "/myapp/",
> then the request htpp://myhost/ will ending up causing
> myapp to handle the request.

Yes, using a filter or valve to forward or redirect requests to the
desired URI should work.

 - 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: How to specify a default context?

2007-09-30 Thread Ken Bowen
Absolutely all correct, including the design flaws (partly due to the 
learning curve, partly to the
process of pasting together non-web software which has such embedded 
knowledge -- needs

to be overcome).

However, after my 3rd cup of coffee this morning, it occurrs to me that 
what I'm after is not
really that myapp be the /default/ application, but that myapp be the 
application which runs
when the server receives the request http://myhost, where myhost is the 
name of the HOST
in which myapp is a Context.  As a Context for HOST, the request 
http://myhost/myapp/
causes myapp to run.  Since I plan to use 
http://tuckey.org/urlrewrite/ to rewrite URLs, 
and since "/" will rewrite to "/myapp/",  then the request htpp://myhost/

will ending up causing myapp to handle the request.

Is this sound?  Am I missing something here?

Thanks,
Ken

Caldarale, Charles R wrote:
From: Ken Bowen [mailto:[EMAIL PROTECTED] 
Subject: Re: How to specify a default context?


Is there no other way, one which leaves the app with its 
original name?



Place your webapp outside of the 's appBase directory, and put
your  element in conf/Catalina/[host]/ROOT.xml with a docBase
attribute pointing to the absolute file system location of your webapp.

  
Because of the convoluted way I've written the app, renaming 
it to ROOT has bad effects.



If you have coded the app to use a specific URL to refer to itself, then
it can't be the default app, can it?  If you've coded I/O paths within
the app, then you've violated the servlet spec, which expects that
webapps can be deployed on devices without file systems.  Either are
major design flaws that should never make it into a production system.

 - 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: How to specify a default context?

2007-09-30 Thread Caldarale, Charles R
> From: Ken Bowen [mailto:[EMAIL PROTECTED] 
> Subject: Re: How to specify a default context?
> 
> Is there no other way, one which leaves the app with its 
> original name?

Place your webapp outside of the 's appBase directory, and put
your  element in conf/Catalina/[host]/ROOT.xml with a docBase
attribute pointing to the absolute file system location of your webapp.

> Because of the convoluted way I've written the app, renaming 
> it to ROOT has bad effects.

If you have coded the app to use a specific URL to refer to itself, then
it can't be the default app, can it?  If you've coded I/O paths within
the app, then you've violated the servlet spec, which expects that
webapps can be deployed on devices without file systems.  Either are
major design flaws that should never make it into a production system.

 - 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: How to specify a default context?

2007-09-30 Thread Ken Bowen

Is there no other way, one which leaves the app with its original name?
Because of the convoluted way I've written the app, renaming it to ROOT 
has bad effects.


Thanks,
Ken Bowen

Hassan Schroeder wrote:

On 9/29/07, Ken Bowen <[EMAIL PROTECTED]> wrote:

  

When no contexts for a Host are specified in server.xml, but all are
placed in the META-INF of their respective apps,
how does one specify one of them as the default Context for that Host?



Name it ROOT (directory) or ROOT.war, as appropriate.

HTH,
  


-
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: How to specify a default context?

2007-09-29 Thread Hassan Schroeder
On 9/29/07, Ken Bowen <[EMAIL PROTECTED]> wrote:

> When no contexts for a Host are specified in server.xml, but all are
> placed in the META-INF of their respective apps,
> how does one specify one of them as the default Context for that Host?

Name it ROOT (directory) or ROOT.war, as appropriate.

HTH,
-- 
Hassan Schroeder  [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]



How to specify a default context?

2007-09-29 Thread Ken Bowen

Hi all,

When no contexts for a Host are specified in server.xml, but all are 
placed in the META-INF of their respective apps,

how does one specify one of them as the default Context for that Host?

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html doesn't seem 
to say what to do:


   path:...If you specify a context path of an empty string
   (""), you are defining the /default/ web application for this Host,
   which will process all requests not assigned to other Contexts. The
   value of this field must not be set except when statically defining
   a Context in server.xml, as it will be inferred from the filenames
   used for either the .xml context file or the docBase.

Using the simple Tomcat sample 
(http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war),  I 
set up a test setting:


Host definition from server.xml:

 
 www.strong-brain.com
 
 
 
 

Applications in tomcat5/webapps:

   ROOT  sample  sample.war  sample2

[sample2 is just a slightly edited copy of sample]
Out of the box, neither has a context.xml in META-INF. 
Connecting to http://strong-brain.com/sample or 
http://strong-brain.com/sample2 gives the expected result, and connecting
tohttp://strong-brain.com/   yields the Tomcat manager (Is that 
because it is the first context listed in Host??)


Despite the prohibition on using 'path=...' in Contexts in META-INF, I 
tried putting this in webapps/sample/META-INF/context.xml:




It didn't have any effect.  In particular, connecting to 
http://strong-brain.com/  still yielded the manager.


So how can I make sample or sample2 the default webapp for this Host, 
running when the connection to http://strong-brain.com/  is made???


Thanks,
Ken Bowen




-
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: Tomcat default context

2007-02-19 Thread Caldarale, Charles R
> From: Gardner, Brad [mailto:[EMAIL PROTECTED]
> Subject: Tomcat default context
> 
> I created the ROOT.xml file under /conf///
> and placed this tag into the file:
> 
> 

Don't put your webapp in the 's appBase directory; if you do it
may be deployed twice, once as the name on the .xml file, and once as
the name of the appBase sub-directory.  Keep the webapp outside of
Tomcat's directory structure, and use an absolute path on the docBase
attribute.

> This resulted in no change, and the default tomcat page still appears
> when I view my webapp.

You need to delete Tomcat's ROOT directory and everything in it.  (Or
rename it to something other than ROOT if you want to keep it around.)

> I have also tried adding path="" with the same result.

The path attribute is not allowed unless the  is inside
server.xml, which you're trying to avoid.

> Any ideas on what I may be missing or mis-understanding?

You're not removing Tomcat's original default context.

 - 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: Tomcat default context

2007-02-19 Thread Propes, Barry L [GCG-NAOT]
oh, ok. Hadn't gone down that road yet. Good to know.

Then would it be 
  ?


-Original Message-
From: Gardner, Brad [mailto:[EMAIL PROTECTED]
Sent: Monday, February 19, 2007 10:52 AM
To: Tomcat Users List
Subject: RE: Tomcat default context


This is from the documentation that comes with tomcat 5

"Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended
to place  elements directly in the server.xml file"

Doing it outside the server.xml file allows you to make changes without
restarting tomcat.  Nice feature, but still working on the root context.

-Original Message-
From: Propes, Barry L [GCG-NAOT] [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 19, 2007 11:48 AM
To: Tomcat Users List
Subject: RE: Tomcat default context

didn't know it was possible....to set up a default context outside of
the server.xml file.
I thought Tomcat required that.

-Original Message-
From: Gardner, Brad [mailto:[EMAIL PROTECTED]
Sent: Monday, February 19, 2007 10:43 AM
To: users@tomcat.apache.org
Subject: Tomcat default context


 

I am using tomcat 5.5.20 and attempting to set up a default context
without placing the context tag inside of the server.xml file.  I
created the ROOT.xml file under /conf///
and placed this tag into the file:

 



 

This resulted in no change, and the default tomcat page still appears
when I view my webapp.  I have also tried adding path="" with the same
result.  This tag works fine when placed inside server.xml, but I am
trying to avoid that now.  Any ideas on what I may be missing or
mis-understanding?


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


-
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: Tomcat default context

2007-02-19 Thread Gardner, Brad
This is from the documentation that comes with tomcat 5

"Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended
to place  elements directly in the server.xml file"

Doing it outside the server.xml file allows you to make changes without
restarting tomcat.  Nice feature, but still working on the root context.

-Original Message-
From: Propes, Barry L [GCG-NAOT] [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 19, 2007 11:48 AM
To: Tomcat Users List
Subject: RE: Tomcat default context

didn't know it was possible....to set up a default context outside of
the server.xml file.
I thought Tomcat required that.

-Original Message-
From: Gardner, Brad [mailto:[EMAIL PROTECTED]
Sent: Monday, February 19, 2007 10:43 AM
To: users@tomcat.apache.org
Subject: Tomcat default context


 

I am using tomcat 5.5.20 and attempting to set up a default context
without placing the context tag inside of the server.xml file.  I
created the ROOT.xml file under /conf///
and placed this tag into the file:

 



 

This resulted in no change, and the default tomcat page still appears
when I view my webapp.  I have also tried adding path="" with the same
result.  This tag works fine when placed inside server.xml, but I am
trying to avoid that now.  Any ideas on what I may be missing or
mis-understanding?


-
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: Tomcat default context

2007-02-19 Thread Propes, Barry L [GCG-NAOT]
didn't know it was possibleto set up a default context outside of the 
server.xml file.
I thought Tomcat required that.

-Original Message-
From: Gardner, Brad [mailto:[EMAIL PROTECTED]
Sent: Monday, February 19, 2007 10:43 AM
To: users@tomcat.apache.org
Subject: Tomcat default context


 

I am using tomcat 5.5.20 and attempting to set up a default context
without placing the context tag inside of the server.xml file.  I
created the ROOT.xml file under /conf///
and placed this tag into the file:

 



 

This resulted in no change, and the default tomcat page still appears
when I view my webapp.  I have also tried adding path="" with the same
result.  This tag works fine when placed inside server.xml, but I am
trying to avoid that now.  Any ideas on what I may be missing or
mis-understanding?


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



Tomcat default context

2007-02-19 Thread Gardner, Brad
 

I am using tomcat 5.5.20 and attempting to set up a default context
without placing the context tag inside of the server.xml file.  I
created the ROOT.xml file under /conf///
and placed this tag into the file:

 



 

This resulted in no change, and the default tomcat page still appears
when I view my webapp.  I have also tried adding path="" with the same
result.  This tag works fine when placed inside server.xml, but I am
trying to avoid that now.  Any ideas on what I may be missing or
mis-understanding?



Re: How to set app as default context in Tomcat?

2006-12-07 Thread Martin Dubuc

The way I am handling this, and it is probably not very clean, but it
works for me, is to define an index.html file in webapps/ROOT with
this content:





On 12/7/06, kkus <[EMAIL PROTECTED]> wrote:


I am using Tomcat 5.5.20 and my app in XP. I need set my app as default
context so I will only use url localhost:8080 instead of localhost:8080/app.
The way I found is to set a  in  of server.xml. But this led
to my app loaded twice when it started. Meanwhile 5.5.20 has discouraged use
of  in , which is correct for my app since it has its own
context.xml under meta-inf folder.

The only line I added in server.xml is as below( only),





My context.xml is,


Can anyone give me some hints? Thanks!
--
View this message in context: 
http://www.nabble.com/How-to-set-app-as-default-context-in-Tomcat--tf2776569.html#a7745991
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
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: How to set app as default context in Tomcat?

2006-12-07 Thread Caldarale, Charles R
> From: kkus [mailto:[EMAIL PROTECTED] 
> Subject: How to set app as default context in Tomcat?
> 
> I am using Tomcat 5.5.20 and my app in XP. I need set my app 
> as default context so I will only use url localhost:8080
> instead of localhost:8080/app.

The default app must be named ROOT.  This is supplied by the name of the
subdirectory of webapps, or packaging your app as ROOT.war under
webapps.  You may also specify it by using a  element in
conf/[engine]/[host]/ROOT.xml, if your app is deployed somewhere other
than Tomcat's webapps directory.  The  element normally goes in
webapps//META-INF/context.xml.

> The only line I added in server.xml is as below( only),

It is strongly discouraged to put  elements in server.xml,
since it requires a Tomcat restart to change them.

Read the doc:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

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



How to set app as default context in Tomcat?

2006-12-07 Thread kkus

I am using Tomcat 5.5.20 and my app in XP. I need set my app as default
context so I will only use url localhost:8080 instead of localhost:8080/app.
The way I found is to set a  in  of server.xml. But this led
to my app loaded twice when it started. Meanwhile 5.5.20 has discouraged use
of  in , which is correct for my app since it has its own
context.xml under meta-inf folder.

The only line I added in server.xml is as below( only),





My context.xml is,


Can anyone give me some hints? Thanks!
-- 
View this message in context: 
http://www.nabble.com/How-to-set-app-as-default-context-in-Tomcat--tf2776569.html#a7745991
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
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: Question regarding appBase/docBase and default context.

2006-10-25 Thread Rizalino

Please disregard this post, it looks like Charles has answered my questions
from a previous thread... which I found on nabble instead.

Thanks again Charles, and for all of you guys who helped in solving my case. 

Rizalino


Rizalino DeVilleres wrote:
> 
> Guys, 
> 
>  
> 
> We would like both appBase and docBase to be the same for the default
> Context (is this possible?)
> 
>  
> 
> *Basically, all the WAR/JSPs/Servlets will all go/served by tomcat from
> the public_html folder?*
> 
>  
> 
> Here is the current setup that worked and resolved the other issue but
> it
> 
> created issues in serving WAR/JSP pages.
> 
>  
> 
> $CATALINA_BASE/conf/Engine/Host/ROOT.xml:
> 
>  
> 
> 
> 
> 
> 
>  
> 
> $CATALINA_BASE/conf/server.xml:
> 
>  
> 
>
>unpackWARs="true" autoDeploy="true"
> 
>xmlValidation="false" xmlNamespaceAware="false">
> 
>  
> 
> No Context path defined in it.
> 
>  
> 
> *If I set the appBase to be the same as the docBase, I errors regarding
> appBase supposed to be within docBase.*
> 
>  
> 
> ---
> 
>  
> 
> If we drop a Hello World JSP script in /path/to/public_html/servlet
> 
>  
> 
> (web server has a URL mapping to pass all request that matches servlet
> 
> OR .jsp extensions to Tomcat)
> 
>  
> 
> http://domain.com/helloworld.jsp -works.
> 
> http://domain.com/servlet/helloworld.jsp -doesnt work and generates a
> 
> 404 error;
> 
>  
> 
> The requested resource (/servlet/helloworld.jsp) is not available.
> 
>  
> 
> This works if Tomcat is set as follows but it breaks the other setup
> 
> above.
> 
>  
> 
> server.xml:
> 
>  
>unpackWARs="true" autoDeploy="true"
> 
>xmlValidation="false" xmlNamespaceAware="false">
> 
>  
> 
> 
> 
>  
> 
> and remove $CATALINA_BASE/conf/Engine/Host/ROOT.xml
> 
>  
> 
>  
> 
> Thanks,
> 
> Rizalino de Villeres
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Question-regarding-appBase-docBase-and-default-context.-tf2496750.html#a7005966
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Question regarding appBase/docBase and default context.

2006-10-23 Thread Rizalino DeVilleres
Guys, 

 

We would like both appBase and docBase to be the same for the default
Context (is this possible?)

 

*Basically, all the WAR/JSPs/Servlets will all go/served by tomcat from
the public_html folder?*

 

Here is the current setup that worked and resolved the other issue but
it

created issues in serving WAR/JSP pages.

 

$CATALINA_BASE/conf/Engine/Host/ROOT.xml:

 





 

$CATALINA_BASE/conf/server.xml:

 

  

 

No Context path defined in it.

 

*If I set the appBase to be the same as the docBase, I errors regarding
appBase supposed to be within docBase.*

 

---

 

If we drop a Hello World JSP script in /path/to/public_html/servlet

 

(web server has a URL mapping to pass all request that matches servlet

OR .jsp extensions to Tomcat)

 

http://domain.com/helloworld.jsp -works.

http://domain.com/servlet/helloworld.jsp -doesnt work and generates a

404 error;

 

The requested resource (/servlet/helloworld.jsp) is not available.

 

This works if Tomcat is set as follows but it breaks the other setup

above.

 

server.xml:



 



 

and remove $CATALINA_BASE/conf/Engine/Host/ROOT.xml

 

 

Thanks,

Rizalino de Villeres



Re: v5.5.x default context support outside of server.xml

2006-10-12 Thread Gregor Schneider

It also worked for me:

- putting context.xml to webpass/YOUR_WEPAPP/META-INF
- pack your web-app as ROOT.war
- deploy it

Tomcat will copy your context.xml from META-INF to
conf/[engine]/[host]/ROOT.xml

Cheers

Greg

PS.: tomcat 5.5.17
--
what's puzzlin' you, is the nature of my game


Re: v5.5.x default context support outside of server.xml

2006-10-12 Thread Jon Wilmoth
Thanks.  I renamed my stand-alone context definition 
conf/[engine]/[host]/ROOT.xml and it worked.  
 
FYI...I've asked the developer list about the possibility of respecting the 
empty string path attribute value regardless of where the context is defined 
and/or update the documentation to capture this specific naming requirement for 
specifying the defining the host's default context (aka webapp).

- Original Message 
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Thursday, October 12, 2006 9:06:00 AM
Subject: RE: v5.5.x default context support outside of server.xml


> From: Jon Wilmoth [mailto:[EMAIL PROTECTED] 
> Subject: v5.5.x default context support outside of server.xml
> 
> There seems to be some conflict between different sections
> of the context config documentation that leads me to believe
> it's not possible to specify a default virtual host's context
> with an empty string "path" attribute for a context.

The doc is a bit obtuse in this area, since it wasn't fully revised from
previous levels.  To specify the default app, you must first delete the
existing webapps/ROOT directory, then install your app in webapps/ROOT
(or webapps/ROOT.war) or put your  element in
conf/[engine]/[host]/ROOT.xml.

- 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: v5.5.x default context support outside of server.xml

2006-10-12 Thread Caldarale, Charles R
> From: Jon Wilmoth [mailto:[EMAIL PROTECTED] 
> Subject: v5.5.x default context support outside of server.xml
> 
> There seems to be some conflict between different sections
> of the context config documentation that leads me to believe
> it's not possible to specify a default virtual host's context
> with an empty string "path" attribute for a context.

The doc is a bit obtuse in this area, since it wasn't fully revised from
previous levels.  To specify the default app, you must first delete the
existing webapps/ROOT directory, then install your app in webapps/ROOT
(or webapps/ROOT.war) or put your  element in
conf/[engine]/[host]/ROOT.xml.

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



v5.5.x default context support outside of server.xml

2006-10-12 Thread Jon Wilmoth
I've tried unsuccessfully to deploy my webapp as the default context for my 
host using a context defined outside of the server.xml (individual files (with 
a ".xml" extension) in the $CATALINA_HOME/conf/[enginename]/[hostname]/ 
directory) as strongly recommended in 
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html*. I searched the 
mailing list archives and found a thread on this subject that ended without any 
resolution. There seems to be some conflict between different sections of the 
context config documentation** that leads me to believe it's not possible to 
specify a default virtual host's context with an empty string "path" attribute 
for a context.  Is this true?  If not, please let me know what I'm missing. 

Thanks, 
Jon 

* "Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended 
to place  elements directly in the server.xml file. Instead, 
put them in the META-INF/context.xml directory of your WAR file or the 
conf directory as described above." 

** "a Context that has an empty PATH attribute will become the default web 
application for the virtual host." 
and 
"The value of this field [path] must not be set except when statically defining 
a Context in server.xml, as it will be infered from the filenames used for 
either the .xml context file or the docBase."

-
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: How set a default context

2006-09-26 Thread Caldarale, Charles R
> From: Angelov, Rossen [mailto:[EMAIL PROTECTED] 
> Subject: RE: How set a default context
> 
> What I wrote was extracted from the same doc, the URL you 
> pasted in your response.

Yes, but you didn't continue to read the rest of the page, which states
how to do it properly in 5.5.

 - 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: How set a default context

2006-09-26 Thread Angelov, Rossen
What I wrote was extracted from the same doc, the URL you pasted in your 
response.

"You may define as many Context elements as you wish. Each such Context MUST 
have a unique context path, which is defined by the path attribute. In 
addition, you MUST define a Context with a context path equal to a zero-length 
string. This Context becomes the default  web application for this virtual 
host, and is used to process all requests that do not match any other Context's 
context path."



-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 26, 2006 2:15 PM
To: Tomcat Users List
Subject: RE: How set a default context


> From: Angelov, Rossen [mailto:[EMAIL PROTECTED] 
> Subject: RE: How set a default context
> 
> - a Context that has an empty PATH attribute will become the 
> default web application for the virtual host. This definitely
> works on Tomcat 5.5

Definitely not true.  Read the doc:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

which states:

"Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended
to place  elements directly in the server.xml file.  Instead,
put them in the META-INF/context.xml directory of your WAR file or the
conf directory as described above."

and

"The value of this field [path] 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."

> - DefaultContext element in the Host is the other way to define a
> default context, but this may work only on Tomcat 5.0

The DefaultContext element only specified the set of attributes common
to all contexts; it did not specify what the default application was.
DefaultContext was replaced by the conf/context.xml file quite some time
ago.

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


"This communication is intended solely for the addressee and is confidential 
and not for third party unauthorized distribution"

-
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: How set a default context

2006-09-26 Thread Caldarale, Charles R
> From: Angelov, Rossen [mailto:[EMAIL PROTECTED] 
> Subject: RE: How set a default context
> 
> - a Context that has an empty PATH attribute will become the 
> default web application for the virtual host. This definitely
> works on Tomcat 5.5

Definitely not true.  Read the doc:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

which states:

"Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended
to place  elements directly in the server.xml file.  Instead,
put them in the META-INF/context.xml directory of your WAR file or the
conf directory as described above."

and

"The value of this field [path] 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."

> - DefaultContext element in the Host is the other way to define a
> default context, but this may work only on Tomcat 5.0

The DefaultContext element only specified the set of attributes common
to all contexts; it did not specify what the default application was.
DefaultContext was replaced by the conf/context.xml file quite some time
ago.

 - 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: How set a default context

2006-09-26 Thread Angelov, Rossen
I know two ways to define a default context in Tomcat:

- a Context that has an empty PATH attribute will become the default web
application for the virtual host. This definitely works on Tomcat 5.5
- DefaultContext element in the Host is the other way to define a
default context, but this may work only on Tomcat 5.0

Ross

-Original Message-
From: Ivan Balashov [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 26, 2006 1:08 PM
To: 'Tomcat Users List'
Subject: RE: How set a default context



I think it should be configurable from somewhere. Moving directories or
writing some custom apps for this IMHo is not quite right.

-Ivan

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 26, 2006 11:54 AM
To: Tomcat Users List
Subject: Re: How set a default context

Ivan Balashov wrote:
> But that means the context of application will change, as opposed to
making
> it default. I'm not sure if this change is harmful to the application,
but
> if it uses e.g. context name for some reason it might be failing.
> 
> -Ivan

If this is the case then you have a badly written application. In the
short term you can try putting a simple ROOT app that just redirects
to your app .

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]

"This communication is intended solely for the addressee and is confidential 
and not for third party unauthorized distribution"

-
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: How set a default context

2006-09-26 Thread Ivan Balashov

I think it should be configurable from somewhere. Moving directories or
writing some custom apps for this IMHo is not quite right.

-Ivan

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 26, 2006 11:54 AM
To: Tomcat Users List
Subject: Re: How set a default context

Ivan Balashov wrote:
> But that means the context of application will change, as opposed to
making
> it default. I'm not sure if this change is harmful to the application, but
> if it uses e.g. context name for some reason it might be failing.
> 
> -Ivan

If this is the case then you have a badly written application. In the
short term you can try putting a simple ROOT app that just redirects
to your app .

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]


smime.p7s
Description: S/MIME cryptographic signature


Re: How set a default context

2006-09-26 Thread Mark Thomas
Ivan Balashov wrote:
> But that means the context of application will change, as opposed to making
> it default. I'm not sure if this change is harmful to the application, but
> if it uses e.g. context name for some reason it might be failing.
> 
> -Ivan

If this is the case then you have a badly written application. In the
short term you can try putting a simple ROOT app that just redirects
to your app .

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: How set a default context

2006-09-26 Thread Ivan Balashov

But that means the context of application will change, as opposed to making
it default. I'm not sure if this change is harmful to the application, but
if it uses e.g. context name for some reason it might be failing.

-Ivan

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 26, 2006 1:38 AM
To: Tomcat Users List
Subject: RE: How set a default context

> From: Gabriel França Campolina [mailto:[EMAIL PROTECTED] 
> Subject: How set a default context
> 
> but I need set the default context (http://localhost:8080)
> that call the /portal context

Delete the existing webapps/ROOT directory, and rename your portal app to
ROOT in the webapps directory.  It can be either ROOT.war or the ROOT
subdirectory.

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


smime.p7s
Description: S/MIME cryptographic signature


RE: How set a default context

2006-09-25 Thread Caldarale, Charles R
> From: Gabriel França Campolina [mailto:[EMAIL PROTECTED] 
> Subject: How set a default context
> 
> but I need set the default context (http://localhost:8080)
> that call the /portal context

Delete the existing webapps/ROOT directory, and rename your portal app to ROOT 
in the webapps directory.  It can be either ROOT.war or the ROOT subdirectory.

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



How set a default context

2006-09-25 Thread Gabriel França Campolina

Hi people,

I need your help, I install the tomcat 5.5.17 in my sever, and I have two
context in webapps: /portal and /intranet, when I start the tomcat the two
application run ok, but I need set the default context (
http://localhost:8080) that call the /portal context, Someone can help me?

in tomcat 5.0 I set the variable path in a context file configuration = "",
but in tomcat 5.5 don't ok




Sorry, but I'm brazillian and I don't write english very well


Re: Can I change the default context of the manager application?

2006-08-10 Thread David Smith
Just change the name of the context xml file from manager.xml to 
MyManager.xml.  Restart tomcat and the context name of the manager 
webapp will follow.  Tomcat 5.5 made a change that nearly obsoletes the 
path attribute all together taking the name of the context xml file as 
the path.


--David

[EMAIL PROTECTED] wrote:


In Tomcat 5.0.x, it was possible to change the default context of the
manager application by modifying the path attribute of context element,
in the $CATALINA/conf/Catalina/localhost/manager.xml file, from
"/manager" to something else.



Then you could access the manager application via
http://127.0.0.1:8080/MyManager/html.

Now, I am trying to accomplish the same thing in Tomcat 5.5.17 but the
technique no longer has this effect.  Adding a path attribute to the
context element does not seem to have any effect at all.  I have gone as
far as renaming the directory, in which the manager application
physically resides to $CATALINA/server/webapps/MyManager/ and then
adjusting the docBase attribute of the context element to match the new
path.  The manager application runs just fine, but it is still
accessible only via http://127.0.0.1:8080/manager/html.  This has me
confused.  I cannot find where Tomcat has this application mapped to
this path.  


Is it possible to change the default context path to the manager
application on Tomcat 5.5.17?  If so, how is that done?

Thank you,

Timothy


 




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



Can I change the default context of the manager application?

2006-08-10 Thread Timothy.M.Long
In Tomcat 5.0.x, it was possible to change the default context of the
manager application by modifying the path attribute of context element,
in the $CATALINA/conf/Catalina/localhost/manager.xml file, from
"/manager" to something else.



Then you could access the manager application via
http://127.0.0.1:8080/MyManager/html.

Now, I am trying to accomplish the same thing in Tomcat 5.5.17 but the
technique no longer has this effect.  Adding a path attribute to the
context element does not seem to have any effect at all.  I have gone as
far as renaming the directory, in which the manager application
physically resides to $CATALINA/server/webapps/MyManager/ and then
adjusting the docBase attribute of the context element to match the new
path.  The manager application runs just fine, but it is still
accessible only via http://127.0.0.1:8080/manager/html.  This has me
confused.  I cannot find where Tomcat has this application mapped to
this path.  

Is it possible to change the default context path to the manager
application on Tomcat 5.5.17?  If so, how is that done?

Thank you,

Timothy



Re: how do I set up a default context for a virtual host

2006-06-21 Thread Pid
If you put wiki.war into c:/wiki it will deploy and create
 c:/wiki/wiki/
then the app will (if it's working) be available at:
 http://server:port/wiki/


teknokrat wrote:
> Yeah, I have. If you have a look at the bottom I have a ROOT.xml with

Read it again.

> 
> 
> I have tried using just  with no success
> 
> Pid wrote:
>> Read the docs:
>>
>> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>>
>> Context path attribute: "The value of this field must not be set except
>> when statically defining a Context in server.xml, as it will be infered
>> from the filenames used for either the .xml context file or the docBase."

This means that if you put the context element inside the host in
server.xml, you CAN set the path, BUT if you put it in
$CATALINA/conf/Catalina/host/ then the path attribute *is ignored*.

By not setting the docBase the server is looking in "c:/wiki", but as
we've established, your app is in "c:/wiki/wiki"
What does the context.xml in the wiki.war/META-INF contain?

Configure it so:
 tomcat/conf/Catalina/wiki.net/ROOT.xml
contains
 

And server.xml contains
 ...
 

And c:/wiki/ contains a directory called ROOT with the application
completely deployed inside it. (Deploying it as ROOT.war should do the
trick).


Oh, and it is auto-deploying the war file, right?







>>
>>
>>
>>
>> teknokrat wrote:
>>> I trying to setup virtual hosts on tomcat 5.5. and windows.
>>>
>>> I have added the following to server.xml
>>>
>>> 
>>>   >> directory="logs"  prefix="wiki_log." suffix=".log"
>>> timestamp="true"/>
>>> 
>>>
>>> I have added context.xml to conf/Catalina/wiki.net containing
>>>
>>> 
>>>
>>> Then I have added wiki.war to C:\wiki and restarted tomcat.
>>>
>>> Going to http://wiki.net produces nothing, http:/wiki.net/wiki produces
>>> resource not available.
>>>
>>> I have tried changing the application name to ROOT.war and the
>>> context.xml file to ROOT.xml containing
>>>
>>> 
>>>
>>> But this still produces nothing.
>>>
>>> How can I set up tomcat so that going to http://wiki.net runs my
>>> wiki.war?
>>>
>>>
>>> -
>>> 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]
>>
>>
> 
> 
> -
> 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: how do I set up a default context for a virtual host

2006-06-21 Thread teknokrat

Yeah, I have. If you have a look at the bottom I have a ROOT.xml with




I have tried using just  with no success



Pid wrote:

Read the docs:

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

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





teknokrat wrote:

I trying to setup virtual hosts on tomcat 5.5. and windows.

I have added the following to server.xml


  


I have added context.xml to conf/Catalina/wiki.net containing



Then I have added wiki.war to C:\wiki and restarted tomcat.

Going to http://wiki.net produces nothing, http:/wiki.net/wiki produces
resource not available.

I have tried changing the application name to ROOT.war and the
context.xml file to ROOT.xml containing



But this still produces nothing.

How can I set up tomcat so that going to http://wiki.net runs my wiki.war?


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





-
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: how do I set up a default context for a virtual host

2006-06-21 Thread Pid
Read the docs:

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

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





teknokrat wrote:
> I trying to setup virtual hosts on tomcat 5.5. and windows.
> 
> I have added the following to server.xml
> 
> 
>directory="logs"  prefix="wiki_log." suffix=".log"
> timestamp="true"/>
> 
> 
> I have added context.xml to conf/Catalina/wiki.net containing
> 
> 
> 
> Then I have added wiki.war to C:\wiki and restarted tomcat.
> 
> Going to http://wiki.net produces nothing, http:/wiki.net/wiki produces
> resource not available.
> 
> I have tried changing the application name to ROOT.war and the
> context.xml file to ROOT.xml containing
> 
> 
> 
> But this still produces nothing.
> 
> How can I set up tomcat so that going to http://wiki.net runs my wiki.war?
> 
> 
> -
> 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]



how do I set up a default context for a virtual host

2006-06-21 Thread teknokrat

I trying to setup virtual hosts on tomcat 5.5. and windows.

I have added the following to server.xml


  


I have added context.xml to conf/Catalina/wiki.net containing



Then I have added wiki.war to C:\wiki and restarted tomcat.

Going to http://wiki.net produces nothing, http:/wiki.net/wiki produces 
resource not available.


I have tried changing the application name to ROOT.war and the 
context.xml file to ROOT.xml containing




But this still produces nothing.

How can I set up tomcat so that going to http://wiki.net runs my wiki.war?


-
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 default context when moving from 5.5.7 to 5.5.12

2005-12-01 Thread Caldarale, Charles R
> From: Jason Burrows [mailto:[EMAIL PROTECTED] 
> Subject: Re: Problem with default context when moving from 
> 5.5.7 to 5.5.12
> 
> I agree, but the best documentation I could find on this was:
> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
> 
> ...and there's nothing in that document that would lead me to try what
> you suggested, even reading now knowing that is the solution.

The documentation has not kept up with the implementation.  (Haven't yet
met a programmer that actually likes to write documentation.)  The key
piece of hard-to-find information is that the default web app must be
specified with the context name (not path) ROOT.

> then says "context elements for the default context must go in 
> your server.xml file"

I can't find any place that says that.  What it does say is "In
addition, you MUST define a Context with a context path equal to a
zero-length string."  Since zero-length filenames are a bit tricky, the
current mechanism uses the name ROOT to create a zero-length context
path.

> Where are you getting documentation that more accurately explains 
> the context setup, and led you to the solution you provided?

Reading this mailing list carefully, experimenting, and not sleeping
much.

 - 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: Problem with default context when moving from 5.5.7 to 5.5.12

2005-12-01 Thread Jason Burrows
Thanks very much Chuck!  That did indeed fix my problem.  I have a
couple of related questions though...

> >
> > This worked fine for me in 5.5.7 (on many machines).
>
> But it shouldn't have.  I suspect this was one of the bugs fixed between
> .7 and .12, where the documented rules are more tightly enforced.

I agree, but the best documentation I could find on this was:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

...and there's nothing in that document that would lead me to try what
you suggested, even reading now knowing that is the solution.  In
addition, there is that spot (directly quoted in my first email, but
I'll paraphrase here) that first says "don't put context elements in
your server.xml file" then says "context elements for the default
context must go in your server.xml file" and then says "you must
provide a default context".  I don't see how all three statements can
be true, and yet that is all I had to go off of.  Where are you
getting documentation that more accurately explains the context setup,
and led you to the solution you provided?

Thanks!
Jason

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



RE: Problem with default context when moving from 5.5.7 to 5.5.12

2005-11-30 Thread Caldarale, Charles R
> From: Jason Burrows [mailto:[EMAIL PROTECTED] 
> Subject: Problem with default context when moving from 5.5.7 to 5.5.12
> 
> Previously, I had a context.xml file in my tomcat\conf directory with
> this context tag (removed sub elements for brevity):
> 
>  crossContext="true">
> 
> 
> This worked fine for me in 5.5.7 (on many machines).

But it shouldn't have.  I suspect this was one of the bugs fixed between
.7 and .12, where the documented rules are more tightly enforced.

> After installing 5.5.12, I see there is a context element in this file
> already.

As I understand it, the conf/context.xml provides global settings
applicable to all webapps; it is not there to define a context for any
particular webapp, just extend the context for each.

> How do I set up a default context in 5.5.12 for a web application that
> is not located in the web apps directory (I could do this for 5.5.7
> and before using the method described above).

Rename your context.xml file to ROOT.xml (case sensitive) and put it in
conf/Catalina/localhost (assuming that's the only  you have
defined).  Remove the path attribute if it's still in there.  Include a
docBase attribute that specifies the location of your webapp (you
probably already have that).  Delete the webapps/ROOT directory.
Restart Tomcat.

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



Problem with default context when moving from 5.5.7 to 5.5.12

2005-11-30 Thread Jason Burrows
Hi all -

I have recently upgraded from Tomcat 5.5.7 to 5.5.12 and now I am
having problems getting my default context to work correctly.  I very
well may have been doing this incorrectly the first time, but I still
need to figure out how to get it working again.  In this specific
case, I am trying to get Tomcat to use an external directory for the
docBase for development purposes, and as I say, it was working
correctly before.  For the moment, I have no other webapps installed
at all.

Previously, I had a context.xml file in my tomcat\conf directory with
this context tag (removed sub elements for brevity):




This worked fine for me in 5.5.7 (on many machines).

After installing 5.5.12, I see there is a context element in this file
already.  If I replace it with mine, it changes nothing (Tomcat starts
and loads no webapps).  If I add mine to the file, it also changes
nothing.  I can in fact add garbage or poorly formed XML to this file
and Tomcat will start up correctly, loading no web apps, reporting no
errors.  No matter what I do to this file, Tomcat loads, but does not
load my application.

If I take my old context.xml file and move it to
tomcat\conf\Catalina\localhost, then it will load my application (I
can tell from log output, but I cannot access the servlets at all). 
This also causes the context.xml file in tomcat\conf to be loaded as
well, and if I have errors there they will be reported.  I should also
mention that in all of these cases (if my app is loading or not
loading) when I point my web browser at http://localhost I get a blank
page with no content.  I get the same result no matter what I put
there, even things I'd expect an error for like
http://localhost/test/blablabla/asfdd.html.  Tomcat doesn't even
generate errors about these attempts in the logs, it just reports that
everything started up correctly, the server is running, and that's the
last I hear from it.

So this tells me this:
5.5.7 would read tomcat\conf\context.xml all the time, but 5.5.12 will
only read it if you have a context file for your specific host (I
imagine it would also read this file if you had a webapp in the
webapps folder as well, but I don't).

In the change logs from 5.5.7 to 5.5.12, the only references I can see
related to the context.xml file are:

-Harmonize processing of the context.xml defaults with the way web.xml
is processed (remm)
-context.xml should be a redeploy resource, and add prioritization for
redeploy resources. (remm)

These don't seem to be related to my situation.

In further reading the Tomcat documentation, I find
(http://tomcat.apache.org/tomcat-5.5-doc/config/context.html):

"Please note that for tomcat 5, unlike tomcat 4.x, it is NOT
recommended to place  elements directly in the server.xml
file."

Then later it says:

"If you specify a context path of an empty string (""), you are
defining the default web application for this Host, which will process
all requests not assigned to other Contexts. The value of this field
must not be set except when statically defining a Context in
server.xml, as it will be infered from the filenames used for either
the .xml context file or the docBase."

...and it also says:

"In addition, you MUST define a Context with a context path equal to a
zero-length string."

So I'm not sure what the correct thing to do is.  I am told NOT to put
context elements in the server.xml file, then I am told that I should
define contexts with an empty string in the server.xml file, and then
I am told that I must define a context with a zero-length string. 
This information is contradictory, so I'm not sure what the correct
course of action is.

So, to sum it up:

How do I set up a default context in 5.5.12 for a web application that
is not located in the web apps directory (I could do this for 5.5.7
and before using the method described above).

Thanks for any help you can offer.

Jason

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