I found the reason of the previous error message. However, I'm still having a problem. This time my <c:import ... tag doesn't load anything at all.

Here is my setup:

/test.jsp (context "")
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
This is test.jsp<br><br>
<c:import url="/hello.jsp" context="/jsp-apps" />

/hello.jsp (context /jsp-apps)
Hello World!<br>

When I view /test.jsp, I only get:
This is test.jsp

In my browser.

I tried one more thing.  I replaced test.jsp with the following:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
This is test.jsp<br><br>
<c:import url="http://www.yahoo.com"; />

It worked! I got a page that says "This is test.jsp" at the top followed by the frontpage of yahoo.com.

Any suggestions?

Asim

On Mar 2, 2004, at 11:45 AM, Remy Maucherat wrote:

Asim Alp wrote:
My application was running without any problems on Tomcat 5.0.18. After upgrading to Tomcat 5.0.19, I started having problems with my cross context includes. I haven't changed a single line of code. Server.xml is the same as well. Here is the host section on my server.xml:
<Host name="www.domain1.com" debug="0" appBase="webapps/domains" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="BXSCI_" suffix=".log" timestamp="true"/>
<Context path="" docBase="domain1" debug="0" crossContext="true" caseSensitive="false" />
<Context path="/jsp-apps" docBase="jsp-apps" debug="0" crossContext="true" caseSensitive="false" />
</Host>
In the "/" context, my index.jsp is as follows:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<c:import url="/shared/header.jsp" context="/jsp-apps" />
.....

I tried it and it works for me. <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> Foo1<br> <c:import url="/dates/date.jsp" context="/jsp-examples" /> <br>Foo2

Your context needs to be crossContext, of course.

--
xxxxxxxxxxxxxxxxxxxxxxxxx
R�my Maucherat
Developer & Consultant
JBoss Group (Europe) S�RL
xxxxxxxxxxxxxxxxxxxxxxxxx

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to