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

Regards
Andrew Connick

Reply via email to