Skip to main content



      Home
Home » Eclipse Projects » Equinox » Getting reference to default ServletContext
Getting reference to default ServletContext [message #70340] Wed, 19 July 2006 15:13 Go to next message
Eclipse UserFriend
Originally posted by: duncan.krebsnet.com

Hi,
I'm working on porting some other frameworks into my server side OSGI
application and have come across a snag: During the activation of one of
my bundles I want to load a port of MyFaces and to get the party started I
need to have a reference to the servletContext. Little confused if the
code would be the same for using the Http service as well as running
inside a servlet container. Assuming I'm running the equinox.httpservice
does anyone know how to grab the servletContext of the "default context"
without having a reference to a current request? - Thanks Duncan
Re: Getting reference to default ServletContext [message #70401 is a reply to message #70340] Wed, 19 July 2006 21:35 Go to previous message
Eclipse UserFriend
Originally posted by: skaegi.sympatico.ca

Hi Duncan,

The only standard way that you can retrieve the ServletContext (that
corresponds to the default Http Context) prior to a request is at
registration time. (e.g. during the ensuing Servlet.init(ServletConfig)
call.)

Does the JSF stuff you're interested in normally gets initialized in a
Listener? It's a bit of hack but you can simulate this behaviour in the
init and destroy methods of an InitializationServlet or similar.

-Simon
Previous Topic:servlet.bridge.launcher build
Next Topic:Quiestion about Remote Management?
Goto Forum:
  


Current Time: Tue May 06 22:48:25 EDT 2025

Powered by FUDForum. Page generated in 0.04730 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top