tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Connick" <a.conn...@virgin.net>
Subject Re: Problems with jsp include files in sub-directories
Date Wed, 09 Jul 2008 20:54:13 GMT

Hello Mark Thomas

Thanks for your reply.

I have got some information from my hosting company, my setup is:
<Host name="windsor-chamber.co.uk" appBase="/home/andrew42/public_html">
<Alias>www.windsor-chamber.co.uk</Alias>
<Context path="" reloadable="true" docBase="/home/andrew42/public_html"
debug="1"/>
</Host>

Which doesn't quite fit with your example, although I suspect that as
appBase equals docBase I will have similar or same problem ?

One further question, could you clarify your correct configuration example,
I am not sure what the first line means
( mv .../webapps/yourApp .../webapps/ROOT )

Regards
Andrew Connick

----- Original Message ----- 
From: "Mark Thomas" <markt@apache.org>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Wednesday, July 09, 2008 3:34 PM
Subject: Re: Problems with jsp include files in sub-directories


> Andrew Connick wrote:
> > I'm having problems with the jsp includes directive where the jsp is in
a sub-directory.
> > I have 2 subdirectories:
> > /admin
> > /segments
> >
> > index.jsp contains the line <%@ include file="/segments/setup.jsp" %>
which is fine
> >
> > admin/index.jsp also contains the line <%@ include
file="/segments/setup.jsp" %>
> > This is fine in my test environment, and used to work in my live
environment (hosted by an external company) but has recently stopped
working.
> >
> > I suspect the issue is that Tomcat now sees sub-directory /admin as a
separate context. I believe I have proved this by running a simple
admin/test.jsp that displays the results of request.getContextPath(). This
shows blank in test and /admin in live.
> >
> > Given that it used to work and has now stopped, I think the hosting
company should be able to correct this. However I am having considerable
difficulty with this approach. As I cannot re-create the situation in my
testing, I am not too sure how to proceed.
> >
> > So, I suppose my real questions are:
> > - Is the way I have structured my code correct ?
> > - How do I stop Tomcat treating each sub-directory as a different
context (more specifically, how do Instruct the hosting company) ?
>
> This sounds like you have a setup of the form:
> <Host ... appBase=".../webapps/yourApp" ...>
>    <Context ... docBase="" ... />
> </Host>
>
> Is this the case? If you are on an older Tomcat version this will work
(due
> to a bug that has since been fixed) but it won't work on newer Tomcat
> versions. The correct configuration (that works on all Tomcat versions)
> should be:
> mv .../webapps/yourApp .../webapps/ROOT
> <Host ... appBase=".../webapps" ...>
> </Host>
>
> HTH,
>
> 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
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.138 / Virus Database: 270.4.7/1541 - Release Date: 7/8/2008
7:50 PM
>
>
>


---------------------------------------------------------------------
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
View raw message