I noticed something interesting. I tried your example using /dates/date.jsp in the jsp-examples context. It worked.

I opened date.jsp and noticed the line: <%@ page session="false"%> at the top of it.

I pasted this line in my hello.jsp and it worked. Any idea why I need this line on Tomcat 5.0.19, but not on 5.0.18?

So, to clarify things:

/test.jsp in 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 in context "jsp-apps":
Hello World!

The output of /test.jsp on Tomcat 5.0.18 is:
This is test.jsp
Hello World!

The output of the same file on Tomcat 5.0.19 is:
This is test.jsp


When I replace /hello.jsp with the following: <%@ page session="false"%> Hello World!

The output on Tomcat 5.0.19 becomes:
This is test.jsp
Hello World!


Isn't this weird?


Asim


On Mar 2, 2004, at 12:04 PM, Asim Alp wrote:


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]



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



Reply via email to