axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal Jayasinghe <dee...@opensource.lk>
Subject Re: Axis2 - HttpServletContext via MessageContext
Date Fri, 28 Jul 2006 04:48:49 GMT


Amit Patel wrote:

> I have a question regarding retrieving MessageContext with Axis2 in
> attempt to retrieve ServletContext.
>  
> I used the following code in Axis1, which worked perfectly:
>  
> MessageContext = MessageContext.getCurrentContext();
>   HttpServlet servlet = (HttpServlet) mycontext
>     .getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
>   ServletConfiltered= servlet.getServletContext()

in Axis2 use the following
msgCtx.getProperty(Constants.SERVLET_CONTEXT);

>  
> However, the getCurrentContext static method is no longer supported
> with the Axis2 implementation of MessageContext.

yes , Axis2 does not have that concept.

>  
> How can I retrieve the MessageContext and/or ServletContext with Axis2?

Its depend on the location where you are trying to access that , if you
want to access that inside a handler then of course you can do that.

>  
> Thanks,
>  
> Amit
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message