You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bob Damato <bo...@coxtarget.com> on 2006/05/08 14:47:06 UTC

c:import and session scope in tomcat

I have two webapps. 
Webapp one contains this JSP 
x.jsp: 
---------------------------------------------------------- 
<%@ taglib uri="/c.tld" prefix="c" %> 
<% 
session.setAttribute("tester", "this is a test attribute"); 
%> 
<PRE> 
Value from attribute in webapp one: <c:out value="${tester}" /> 
<c:import context="/webapp2" url="/y.jsp" /> 
---------------------------------------------------------- 

Webapp two contains this JSP 
y.jsp 
---------------------------------------------------------- 
<%@ taglib uri="/c.tld" prefix="c" %> 
Value of attribute from webapp two: <c:out value="${tester}" /> 
---------------------------------------------------------- 
Under our current web container (servlet exec 4.2) with context sharing
enabled, webapp two has access to the session attribute "tester" from
webapp one.
When we run this under Tomcat 5.5 with crossContext enabled, webapp two
does not have access to that session attribute. 
Anyone have any idea why? Which one is correct?


________________________________________________________________________
_____________
Bob Damato
Cox Target Media	
Internet Technology Manager
Largo, Florida

Our greatest glory is not in never falling, but in rising every time we
fall.  -- Confucius