aspose file tools
The moose likes Web Services and the fly likes Getting file path for webservice project Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply 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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Getting file path for webservice project
 
Similar Threads
Referencing images in a servlet
going nuts trying to reference images on server
file locations in Netbeans project and in glassfish
Uploading Files
Using Glassfish instead of Axis2 in Eclipse