Hi Feh,
You can get the ServletContext as follows (In Axis 1.3). Which
Axis version are you using?
For Axis 1.3
MessageContext context = MessageContext.getCurrentContext();
HttpServlet servlet =
(HttpServlet)context.getProperty(HTTPConstants.MC_HTTP_SERVLET);
ServletContext servletContext = servlet.getServletContext();
For Axis2 1.2
MessageContext context =
MessageContext.getCurrentMessageContext();
HttpServlet servlet =
(HttpServlet)context.getProperty(HTTPConstants.MC_HTTP_SERVLET);
ServletContext servletContext = servlet.getServletContext();
Thanks
Raghu
-----Original Message-----
From: feh [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 14, 2007 2:04 PM
To: [email protected]
Subject: access to ServletConfig from service class
I've embedded Axis2 in an existing application running under Tomcat,
such
that the AxisServlet is specified in web.xml, and all requests for
/app/services/* are routed to Axis.
Axis then takes care of calling my service methods for a given request.
Does anybody know how I can get a reference to the ServletContext or
ServletConfig from within a service method?
Thanks!
--
View this message in context:
http://www.nabble.com/access-to-ServletConfig-from-service-class-tf42697
06.html#a12152200
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
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]