Google Answers Logo
View Question
 
Q: Include problems with Tomcat ( No Answer,   0 Comments )
Question  
Subject: Include problems with Tomcat
Category: Computers > Programming
Asked by: eksolutions-ga
List Price: $10.00
Posted: 25 Mar 2003 21:17 PST
Expires: 26 Mar 2003 16:45 PST
Question ID: 181018
I'm using Tomcat 4.1.24.

Here is the directory structure I got:

c:/testsite/mydomain0
c:/testsite/mydomain1
c:/testsite/JIncludes

Here are my Virtual Hosts in Server.xml which are working fine:

<Host name="mydomain0.com" debug="0" appBase="c:\testsites"
unpackWARs="true">
<Alias>www.mydomain0.com</Alias>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="mydomain0." suffix=".log"
timestamp="true"/>
<Context path="" docBase="mydomain0" debug="0" reloadable="true"/>
<Context path="/JIncludes" docBase="JIncludes" debug="0"
reloadable="true"/>
</Host>

<Host name="mydomain1.com" debug="0" appBase="c:\testsites"
unpackWARs="true">
<Alias>www.mydomain1.com</Alias>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="mydomain1." suffix=".log"
timestamp="true"/>
<Context path="" docBase="mydomain1" debug="0" reloadable="true"/>
<Context path="/JIncludes" docBase="JIncludes" debug="0"
reloadable="true"/>
</Host>

Now here is my problem:
Let's say I have;
---- c:/testsites/mydomain/test.asp ----
<%! String s = "Hello World Zero"; %>
<%@ include file="/JIncludes/inc.jsp" %>
<%= s %>
---- end of file ----

And;
---- c:/testsites/JIncludes/inc.jsp ----
<% s += " JIncludes is working"; %>
---- end of file ----


Somehow, I get an error message that says:
org.apache.jasper.JasperException: /test.jsp(1,0) File
"/JIncludes/inc.jsp" not found
even though the "/JIncludes" context is defined.

One more thing. For debugging purposes, I have created a test file
c:/testsites/JIncludes/index.html and tried to access it using
http://mydomain0.com:8080/JIncludes/index.html and it worked. I was
also able to access the same file through the second domain name
(mydomain1).

Do you have any idea why I cannot include a file which is not in my
default context which is ""?

Thanks,
Asim
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy