You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jian Zhen <zh...@gmail.com> on 2006/06/12 07:36:22 UTC

Re: [Axis2] servletContext & service scope

Found this thread on the topic of servletContext:

http://mail-archives.apache.org/mod_mbox/ws-axis-user/200510.mbox/% 
3C026c01c5dafa$ba48a790$c201a8c0@Deepal%3E

I looked through the code for AxisServlet.java and found that it's  
only set for POST operations (in the method doPost).

This means that only SOAP operations will get access to  
servletContext, but not REST operations.

Adding this line to createMessageContext method (right before the  
return) resolves this issue:

msgContext.setProperty(Constants.SERVLET_CONTEXT,  
servletConfig.getServletContext());

Can this be considered for the next release?

thx

On 10/27/05, Deepal Jayasinghe <de...@opensource.lk> wrote:
 > done ,
 >  now any one can get the ServletContext from msgContxt calling
 > getProperty("servletContext");
 >
 > Thanks,
 >  Deepal
 > ................................................................
 > ~Future is Open~

--
Jian Zhen <zh...@gmail.com>
http://www.zhen.org




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


Re: [Axis2] servletContext & service scope

Posted by Deepal Jayasinghe <de...@opensource.lk>.
 I made the changes to current code base.

Jian Zhen wrote:

> Found this thread on the topic of servletContext:
>
> http://mail-archives.apache.org/mod_mbox/ws-axis-user/200510.mbox/%
> 3C026c01c5dafa$ba48a790$c201a8c0@Deepal%3E
>
> I looked through the code for AxisServlet.java and found that it's 
> only set for POST operations (in the method doPost).
>
> This means that only SOAP operations will get access to 
> servletContext, but not REST operations.
>
> Adding this line to createMessageContext method (right before the 
> return) resolves this issue:
>
> msgContext.setProperty(Constants.SERVLET_CONTEXT, 
> servletConfig.getServletContext());
>
> Can this be considered for the next release?
>
> thx
>
> On 10/27/05, Deepal Jayasinghe <de...@opensource.lk> wrote:
> > done ,
> >  now any one can get the ServletContext from msgContxt calling
> > getProperty("servletContext");
> >
> > Thanks,
> >  Deepal
> > ................................................................
> > ~Future is Open~
>
> -- 
> Jian Zhen <zh...@gmail.com>
> http://www.zhen.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>

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



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