More information....

In my pages I am now logging the current session id, if the session is new,
and the value of all cookies.

In those cases where I am getting an error (and this is on a second or third
page), the session is new and there is a jsessionid cookie even though I
have disabled cookies in the server.xml file, and the value of the
jsessionid cookie does not match the session in use.

What this says to me is that for some reason Tomcat does not find the
existing session, tries to recreate it, and causes my error since I do not
let beans get created in subsequent pages.

Any thoughts on why Tomcat cannot find the session?

Any thoughts on why even if I have cookies disabled, Tomcat is trying to set
a cookie?

Could this have something do with client side caching and/or proxy caches?

Thanks.

James


-----Original Message-----
From: James Morgenstein [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 12:27 PM
To: [EMAIL PROTECTED]
Subject: Problem retrieving bean from session....


All-

Three pages into my application I am attempting to retrieve a bean using the
same useBean clause as on the second page (cut and paste here for
comparison):

  <jsp:useBean id="CAMPAIGN" scope="session"
type="com.recommendit.beans.CampaignVB106Bean"  > </jsp:useBean>
  <jsp:useBean id="CAMPAIGN" scope="session"
type="com.recommendit.beans.CampaignVB106Bean"  > </jsp:useBean>

The bean should already be in the session from previous pages; therefore, I
have a type clause instead of a class clause.

I am receiving the following error on a inconsistent basis:
  java.lang.InstantiationException: bean CAMPAIGN  not found within scope

I am using Tomcat 3.2b8 with URL rewriting in conjunction Apache 1.3 on
Redhat Linux 6.2.

Is it possible that the application server is not attaching back to the same
session.  I have started logging the session ids and cookies to a log file
and there may be some mismatch here.

Thoughts?

Thanks for the help.

James M. Morgenstein

Reply via email to