tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulf Dittmer <uditt...@passkey.com>
Subject RE: ServletContext - PLS HELP!!
Date Wed, 21 Nov 2001 16:53:51 GMT
Michael,

Request attributes and Context attributes are two separate things.
You should not expect to store an item in one and retrieve it from
the other. The servlet context can be gotten be calling getServletContext()
from within a servlet.

Ulf

-----Original Message-----
From: Michael [mailto:tomcat@meinsenf.at]
Sent: Wednesday, November 21, 2001 11:34 AM
To: tomcat-user@jakarta.apache.org
Subject: ServletContext - PLS HELP!!


 
Hi! 
 
 
Can you help me, in what I'm doing wrong? 
 
 
I set an attribute in the servletcontext:in the initmethod! 
i can access the object using:
config.getServletContext().getAttribute("test") 
but not 
request.getAttribute("test") 
WHY??? 
 
 
how to access this attribute if I only know the HttpServletRequest-object
but not the HttpServlet-object, though I know the contextpath
(request.getContextPath())??? 
 
thanks 
michi 


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message