my dog learned polymorphism*
The moose likes Web Services and the fly likes can't use contextPath inside My webservice how to use it. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "can Watch "can New topic
Author

can't use contextPath inside My webservice how to use it.

kannagiri rosei
Ranch Hand

Joined: Nov 26, 2005
Posts: 31
Hi


i just want use context path in axis web app. in my service method. i am reading constant value from properties file.

String path = System.getProperty(user.dir);
i used above java api.but not reading properly.


my property file is path is

axis-web app

/web-inf
classes
/myservice-read property file path.
/config


am deploying WAS5.1

tool/WSADIE5.1

//user.dir
takes default WASDIE path in WAS.
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Please check out our famous Ulf home grown web services FAQ


Spritle Software Blogs
kannagiri rosei
Ranch Hand

Joined: Nov 26, 2005
Posts: 31
FYI

if i use getContextPath() -- it will return remote Service provider path only is it?
please let me clear balaji sir?

HttpServletRequest req = (HttpServletRequest) context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Yes.

Kind request: Please avoid using sir, just balaji is fine.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: can't use contextPath inside My webservice how to use it.