permaculture playing cards*
The moose likes Web Services and the fly likes Getting file path for webservice project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Getting file path for webservice project" Watch "Getting file path for webservice project" New topic
Author

Getting file path for webservice project

Steve Simon
Greenhorn

Joined: Jan 28, 2012
Posts: 12
I am using Glassfish, and am attempting to write files to disk from a web application.

Unfortunately the file is written directly to the Glassfish server directory ("C:\...\.netbeans\7.0\config\GF3\domain1")
and not to my project directory (which is where I want it to be saved to).

For Servlets, I got around this problem, using the following method:
String filepath = getServletContext().getRealPath("/");

But for my web service, I cannot use this method, and am struggling to find one which would work.
Does anyone know of a method which might help?

Thanks very much


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting file path for webservice project
 
Similar Threads
Uploading Files
going nuts trying to reference images on server
Using Glassfish instead of Axis2 in Eclipse
file locations in Netbeans project and in glassfish
Referencing images in a servlet