• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Lookup the url to the web module

 
Alfred C. Thomas
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have an application consisting of EJB and WEB modules on JBoss. I need to find the url to the web module from the EJB side, does anyone know how I can get it? What I tried was to use the contextListener to inject the url, but I couldn't get the context path from the ServletContextEvent object.

Regards
Alfred
[ December 22, 2006: Message edited by: Alfred C. Thomas ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This sounds like an odd requirement. Why are you trying to do this?
 
Alfred C. Thomas
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul

The EJB module sends out e-mails whenever some events occur. I need the url to the web module to be included in the e-mails.

Regards
Alfred
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you not have control of where the particular ejb method is called from (i.e. can it be called from anywhere in your web app)? If this is the case, you could just pass the URL with the method call.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic