Yeah, that's needed for the span of that particular page. But in order to
pass it from place to place as HTTP is stateless you'll need to pass it into
a session, something like this:
session.putValue("con",con); //conn being your connection object.
session.setMaxInactiveInterval(900); //set the timeout.
session.putValue("THIS_SESSION_VARIABLE_NAME",the_variable); //some random
variable
And when you want to get it you include a cast to a connection to make sure
of no confusion (sometimes this is an issue, sometimes it's not depending
upon the reliability of that session):
Connection con=(Connection)session.getValue("con");
Hope this helps.
Matt
Matthew L. Wright
Java Internet Programmer
Jupiter One
Web World Studios West Coast
www.jupiterone.com
(818) 763-2927
----- Original Message -----
From: "Ricardo Forde" <[EMAIL PROTECTED]>
To: "JRun-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, March 08, 2001 12:00 PM
Subject: RE: Passing beans between JSPs..??
> First let me say "thanks". I have thought about using sessions but I was
not
> sure because with in my jsp I use <USEBEAN name"prod" type="product"
> lifespan="page"></USEBEAN> and I was not sure if this would help. What do
> you think?
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists