tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Dunbar <sc...@xigole.com>
Subject Re: jsp:include no longer working in 5.5.23
Date Tue, 08 May 2007 20:39:28 GMT
Thanks for the input.  However, I guess I'm still missing something.

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).  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.  There is a Tomcat 
proprietary convention of naming a default one ROOT but that will 
complicate my move to any other app server.  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.  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.

Is what I'm trying to do wrong?  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).  That complicates 
the directory structure and, since the Tomcat 3.x days through at least 
5.5.15 is not the way it worked.

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).

I'll continue to experiment - thanks for your help.



Mark Thomas wrote:
> Scott Dunbar wrote:
>   
>> Thanks, I checked that and my I don't set a docBase in my context:
>>
>> <Host name="domainname.tld" appBase="/home/scott/sites/domainname.tld"
>>              unpackWARs="true" autoDeploy="true"
>>              xmlValidation="false" xmlNamespaceAware="false">
>>
>>            <Context path="" docBase="" />
>>     
>
> And there is the problem. If it isn't absolute, docBase is relative to
> appBase so you do have appBase == docBase
>
> To fix this:
> - remove the Context element from your server.xml
> - assuming you have only one webapp deployed, move the contents of
> /home/scott/sites/domainname.tld to /home/scott/sites/domainname.tld/ROOT
> - if you have multiple webapps deployed, just move the files that are
> part of the ROOT webapp
>
> Mark
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>   


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message