pro_jsp thread: =?us-ascii?Q?RE:_=5Bpro=5Fjsp=5D_I=3Fm_doing_a_Pool_Connection_-_Have_I_a?=---=?us-ascii?Q?_Application_context_to_put_it=3F?=
Hi Kevin
I?m doing a pool connection for a e-commerce, i have 50 con available, but i
need all of it for the application no for a client session.
Have i a application context where to put it for all the application.
When the portal is on (the first time) i do all the 50 connections
available, and then when a client need one i take it from de vector
connection i have.
When the client doesn?t need it i put back to the vector pool.
But i have the problem to take available for all the portal use, no for a
session...
thanks to all and hapy chrismas
Julio Oliveira
Oliveira_Julio@y...
Buenos Aires - Argentina
-----Mensaje original-----
De: Kevin Garnett [mailto:kevin@g...]
Enviado el: Domingo, 23 de Diciembre de 2001 12:28 a.m.
Para: Pro_JavaServer_Pages
Asunto: [pro_jsp] RE: The difference between getParameter and
getAttribute ?
The issue deals with context. There are several context where one can
store objects using the setAttribute method. They are PageContext,
ServletRequest, HttpSession, ServletContext, and a few others. Once you
have stored an object in the respective context, you can then retrieve
it via the appropriate getAttribute() method. The getParameter() method
on the other hand has to do with getting the values from a POST request
for a particular parameter. They are not the same.
When one should use a particular context is based on the desired scope
of the object in question pertinent to the application. If one places an
object in PageContext, ServletRequest, HttpSession or ServletContext
scope under the name of 'foo', then a JSP page can access it using the
appropriate value (page, request, session or application) on the
<jsp:useBean id="foo" scope="" /> line.
I hope this helps,
Kevin
---
Do you need true END-TO-END (e2e) Java Messaging (JMS)? Softwired
offers industry's ONLY complete 100% JMS messaging solutions for your
needs TODAY.
Visit
http://adtracking.wrox.com/track.asp?x=p2p%2Fe%2Fjava%2Dsoftwired&url=www.so
ftwired-inc.com NOW and find
out more!
Our unique product range includes: iBus//Mobile (wireless data),
iBus//MessageBus (IP Multicast), iBus//MessageServer (store and forward)
and much more!
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com