Hi. I try to access a local file from a RESTFul service. Is there any way to get the real path of the running service ? (as we can do in a servlet)
Server : glassfish 3.0.1 IDE : Eclipse Helios
Thx
Hi. I try to access a local file from a RESTFul service. Is there any way to get the real path of the running service ? (as we can do in a servlet)
Server : glassfish 3.0.1 IDE : Eclipse Helios
Thx
Hi Bigmac,
Which framework you are using for REST web service?
You can get the real path in Jersey by following way:
@Context ServletContext context //you can specify in your method argument
String realPath = context.getRealPath("/");
Think will help you.