On 11/7/05, Ron Reynolds <[EMAIL PROTECTED]> wrote:
Servlet context in a web service? Didn't know it was accessible :-)
I suppose I could just create a singleton class and use that, its no different really, except easier to implement?
Many thanks for your replies Ron,
Alex
well, within a web-app you can use the servlet context - you can get to it via
the MessageContext:
MessageContext ctx = MessageContext.getCurrentContext();
Servlet servlet = (Servlet)ctx.getProperty(HTTPConstants.MC_HTTP_SERVLET );
ServletConfig config = servlet.getServletConfig();
ServletContext context = config.getServletContext();
Servlet context in a web service? Didn't know it was accessible :-)
I suppose I could just create a singleton class and use that, its no different really, except easier to implement?
Many thanks for your replies Ron,
Alex
--
beplacid.com...
