dcsimg
Axis WS real path
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   marco_baroetto
Posted On:   Thursday, October 25, 2007 03:26 AM

Hello, Is there a way to get the servlet real path of an axis web service? IE the WEB-INF directory. I found MessageContext mctx = MessageContext.getCurrentContext(); System.out.println("ATTACHMENTS_DIR="+mctx.getProperty(MessageContext.ATTACHMENTS_DIR)); Which is not what I need. and AxisEngine.ENV_SERVLET_REALPATH but I don't know how to use it (AxisEngine doesn't have a getProperty method). thanx for the help Marco    More>>

Hello,

Is there a way to get the servlet real path of an axis web service? IE the WEB-INF directory.



I found

			
MessageContext mctx = MessageContext.getCurrentContext();
System.out.println("ATTACHMENTS_DIR="+mctx.getProperty(MessageContext.ATTACHMENTS_DIR));



Which is not what I need.



and



			
AxisEngine.ENV_SERVLET_REALPATH



but I don't know how to use it (AxisEngine doesn't have a getProperty method).





thanx for the help

Marco    <<Less

Re: Axis WS real path

Posted By:   marco_baroetto  
Posted On:   Thursday, October 25, 2007 04:08 AM

I got it!

get axis web service real path:


AxisHttpSession session = (AxisHttpSession)MessageContext.getCurrentContext().getSession();
HttpSession httpsession = session.getRep();
String propertiesUrn = httpsession.getServletContext().getRealPath("/WEB-INF/");
System.out.println("path="+propertiesUrn);
About | Sitemap | Contact