Are you running on Tomcat? To use this attribute you should deploy the Axis2 war distribution.
Amila. On 8/15/07, feh <[EMAIL PROTECTED]> wrote: > > > > > Raghu Upadhyayula wrote: > > > > 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 > > > > > > Thanks Raghu. > > I'm using Axis2...I gave the code above a try, and while I am able to get > the MessageContext, when I try to get the MC_HTTP_SERVLET property, the > return value is null. > > Any guesses as to why? > > -- > View this message in context: > http://www.nabble.com/access-to-ServletConfig-from-service-class-tf4269706.html#a12163073 > Sent from the Axis - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Amila Suriarachchi, WSO2 Inc.
