tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies" <bim2...@basistech.com>
Subject RE: Where do context end?
Date Mon, 01 Nov 2004 12:44:07 GMT
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:roland.carlsson@alfa-moving.se] 
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" <bim2004@basistech.com>:

> You need a ResourceLink in your context. See the JNDI howto document.
> 
> -----Original Message-----
> From: Roland Carlsson [mailto:roland@alfa-moving.se]
> 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: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message