[Zope] REQUEST parameters needed throughout website
Stacy Roberts Ladnier
Stacy.Roberts@noaa.gov
Mon, 09 Sep 2002 11:18:47 -0500
This is a multi-part message in MIME format.
--------------8168F64AEEB483EA69535541
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I know the session was created for this reason. However, when storing
parameters in the session, we experience problems when a user switches login
names in the same browser session. Parameters that exist under one user name
are persisted over to the new user name and this should not be allowed to
happen. When it does, certain options the user can choose, will cause the
search mechanism to completely crash and write null values to the database.
This then prevents the user from using our site until we detect the Null value
and delete it. As you can imagine, this is a MAJOR problem that has to be
avoided at all costs. When parameters are passed in the REQUEST object, this
problem is resolved.
Right now, we recreate the REQUEST object in each page. This becomes code
intensive and a management nightmare. When one parameter is added, every
single page must be touched. I would love to use the session, but the
resulting problems prevent me from utilizing it. I need a way to persist the
parameters throughout my search capabilities, but wipe the slate clean when a
user logs in as a different user. I tried this out with the session, but a new
session is not created unless I open a new browser instance and then log in in
this new instance.
If I can find a way to force a new SESSION object to start when a user clicks
a certain link, my problem may be solved. I know I ABSOLUTELY want to avoid
passing 50 parameters in the URL string. That is so UGLY.
You mention that I can, in fact, remove the arguments from the session. Can
you please explain how I can do this in detail? I want the transition to ZOPE
to bring about some valuable improvements to our site and the maintenace of
our code.
Stacy
Heimo Laukkanen wrote:
> Subject: Re: [Zope] REQUEST parameters needed throughout website Cc:
> zope@zope.org To: "Stacy Roberts Ladnier" <Stacy.Roberts@noaa.gov>
> From: Jens Vagelpohl <jens@zope.com>
>
> > user's search. I DO NOT want to use the session to store the parameters
> > in because this will cause problems if a certain course of action is
> > taken.
> ...
> > Please understand I am very new to Zope. My company is trying to
> > transition from Java and JSP to Zope and Python. I need to make sure
>
> Since you say:
> a) you are new to Zope
> b) you don't want to use sessions
> c) you need to do something that is exactly what sessions are for,
>
> I'll have to ask - what are the conditions and the course of action
> that makes sessions cause problems? And whatkind of problems they are
> - and is the reason for these problems sessions or something else?
>
> And as a reminder:
>
> 1) HTTP is a sessionless protocol - there is no such thing as a
> session in the protocoll
>
> 2) Passing variables or arguments happens usually either in the URL (
> http://xx.xx.xx?foo=bar&dinner=spam ),as a form field or in a cookie.
>
> 3) Since passing multiple arguments all the time is stupid - systems
> for storing the data with a session key have been developed to
> practicly all the web development platform. Instead of passing all the
> arguments you just pass the session key. And then the session key
> gives you access to all your arguments. And when you are done, you can
> just remove the arguments or kill the session.
>
> Now. Is the session mechanism really the problem?
>
> -huima
--------------8168F64AEEB483EA69535541
Content-Type: text/x-vcard; charset=us-ascii;
name="Stacy.Ladnier.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Stacy Ladnier
Content-Disposition: attachment;
filename="Stacy.Ladnier.vcf"
begin:vcard
n:Ladnier;Stacy
tel;work:228-688-1878
x-mozilla-html:FALSE
org:Anteon/NCDDC
adr:;;;Stennis Space Center;MS;;
version:2.1
email;internet:Stacy.Ladnier@noaa.gov
title:Software Engineer
fn:Stacy Ladnier, SCJP2, SCJD2
end:vcard
--------------8168F64AEEB483EA69535541--