This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Shared folder not accessible when running tomcat as a service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Shared folder not accessible when running tomcat as a service" Watch "Shared folder not accessible when running tomcat as a service" New topic
Author

Shared folder not accessible when running tomcat as a service

Swati Shinde
Greenhorn

Joined: May 28, 2012
Posts: 3
I am running tomcat as a service. I have deployed webservice for my application. The web service implementation

needs to access shared folder on remote PC. Using NetUse command,I have already mapped the network drive for the shared

folder. I am able to open that shared folder using the network drive on windows explorer.

when running tomcat as a service my webservice is not able to access the shared folder. However if I don't run

tomcat as a service and run it from batch file it is able to access the same shared folder.

Is there specific settings to be done for tomcat when it is executed as a service?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15958
    
  19

Welcome to the JavaRanch, Swati!

Most likely the userID that the Tomcat service is running under doesn't have file access permissions. Most Windows services run under a system service userID, although this can be changed via the service control panel.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Shared folder not accessible when running tomcat as a service
 
Similar Threads
Tomcat 5.5 - File/Folder creation problem
Map drive access through Java Application running as a service
Giving path alias to network folder in server.xml
Access Network drive through Java Application running as a service
Run Web application as Specific user.