Scott Dunbar wrote:
> I want a directory to be the root directory of a virtual host.  That
> directory is itself a webapp and may have other directories within it
> that are webapps (with explicit Context elements). 
You simply can't do this. Tomcat was never intended to work this way.
As I said before, that it used to work this way was a side-effect of a
since fixed bug.

> To this point I have
> never had to have a different directory from my default stuff.  In
> effect this change means that there is no such thing as a default webapp
> directory - it must be explicitly enumerated.
Yes there is. It is just called ROOT rather than being the appBase for
the host.

>  There is a Tomcat
> proprietary convention of naming a default one ROOT but that will
> complicate my move to any other app server.
It shouldn't. Build your war. Do whatever the app requires to define
it as the ROOT webapp and deploy it.

>  It also complicates an
> Apache httpd and Tomcat environment.  Previously I was able to put the
> Apache httpd VirtualHost DocumentRoot and the Tomcat Host appBase at the
> same place and have httpd serve static content while Tomcat served
> dynamic content.
This is extremely dangerous from a security point of view. You are
very likely to see source code disclosure issues with your JSPs if you
run your site like this.

>  Now I have to change my directory structure because
> there are really two different places to get root level things.  For
> example, doing a jsp:include of /something.jsp comes from a different
> directory than including CSS from /styles.css.  This just seems more
> complicated to me.  You really can not overlay VirtualHost's and Host's
> anymore.
Yes, I am afraid you do need to change your directory structure. Not
least because of the security issues.

> Is what I'm trying to do wrong?
Sorry, but yes.

>  My frustration stems from the fact that
> I always been able to have a directory that is the root and, optionally,
> separate directories under the root that are webapps with their own
> Context.  What you're saying is that I can't do that - I need an
> explicit directory for my default webapp that is different from the root
> of the virtual host (though it can be a child of it).
The httpd virtual host root should be separate from Tomcat's appBase
which in turn should not be the same as any of the docBase values for
Contexts deployed in that host.

>  That complicates
> the directory structure and, since the Tomcat 3.x days through at least
> 5.5.15 is not the way it worked.
At the risk of getting boring with the repetition - it was never
intended to work this way.

> I guess what I'm looking for is a true default Context but it seems that
> that no longer exists - it must be explicit.  This could explain some
> other problems I'm having with JRoller not being able to be the top of a
> virtual host anymore with 5.5.23 (and, with some experimentation, 5.5.20
> also).
What you are looking for doesn't exist. You might be able to hack it
into working but you would need to be extremely careful.

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]

Reply via email to