No, once your <Context> has a ResourceLink, the same code thatwords in
an action should work anywhere else. You start with an InitialContext
and do a lookup; the HttpServletRequest has nothing to do with the
process. 

-----Original Message-----
From: Roland Carlsson [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 01, 2004 7:15 AM
To: TomcatUsers
Subject: SV: Where do context end?

I have a resourcelink. ..

I can successfully perform my lookup from a struts-action but not from a
class that my struts-action uses.

Do you say that I have to define a resource-link to classes that doesn't
have access to HttpServletRequest or some other class?

Regards
Roland Carlsson




Den 04-11-01 13.10, skrev "Benson Margulies" <[EMAIL PROTECTED]>:

> You need a ResourceLink in your context. See the JNDI howto document.
> 
> -----Original Message-----
> From: Roland Carlsson [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 01, 2004 1:51 AM
> To: TomcatUsers
> Subject: Where do context end?
> 
> Hi!
> 
> I encounterd what I thought to be a little curiosity this weekend. I 
> tried to call a GlobalNamingResource from a class that I'm using as 
> homegrown PersistenceManager, ie it doesn't have anything to do with 
> the webapplication except that it is packaged inside the webapp that 
> uses it.
> 
> I do the usual InitalContext and try to get the JNDI but it says that 
> comp:java isn't bound for this context.
> 
> If I try from the StrutsAction that is calling my class it works nice.
> (cut
> n'paste)
> 
> So, why can't I use the JNDI-lookup from my persistencemanager that 
> runs inside a web-app?
> 
> I apologize if this question belongs in a JNDI forum.
> 
> Thanks in advance
> Roland Carlsson
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to