Re: How to specify a default context?

2007-10-02 Thread Szabolcs Márton
Hi

maybe try this, in server.xml, in tomcat6

Context path= docBase=YOUR_CONTEXT_HERE debug=0 /

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-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
 Context path= docBase=YOUR_CONTEXT_HERE debug=0 /

Please read the docs before posting.  In current versions of Tomcat, do not 
ever put Context 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-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 Host's appBase directory, and put
your Context 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
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 Host's appBase directory, and put
your Context 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?
 
 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-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]