Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why cant my page use my Session Attributes ?

Status
Not open for further replies.

dirtyholmes

Programmer
Mar 17, 2004
43
AU
Hi

i have an application in which i am creating some session attributes
in the following manner. I am able to access these attributes in all my pages except the one in
which i wish to access them. Why are they not accessible in just one page.

(page1.jsp) // Setting the session attribute "counter" )

<%@ page contentType="text/html; charset=utf-8" %>

<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise" %>
<%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession" %>
<%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr" %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.IInfoStore" %>

<%
Integer counter = new Integer(1);
session.setAttribute("counter",counter); %>

(page2.jsp ) // I Can accesss my session attributes in this page

<%@ page contentType="text/html; charset=UTF-8" %>

<%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr" %>
<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise" %>
<%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession" %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.*" %>
<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>

<%
Integer count = (Integer)session.getAttribute("counter");
%>


(page3.jsp ) // I cannot access my session attributes here . Why ??

<%@ page contentType="text/html; charset=UTF-8" %>

<%@ page import="com.crystaldecisions.report.web.viewer.CrystalImageCleaner" %>
<%@ page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer" %>
<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr" %>
<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise" %>
<%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession" %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.managedreports.*" %>

<%
Integer count = (Integer)session.getAttribute("counter");
%>


Why are my session attributes not available on my third page.

Thanks for any assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top