I have developed a java servlet that monitors a folder on a network drive for new files then does some actions on them depending on what kind of file it is. It worked in Eclipse when Eclipse and Tomcat were running with each other, but now that I have deployed it onto a server(different machine), the servlet keeps logging that it cannot find the folder to be mapped. The exact same network drive is mapped, and the folder definitely exists. This problem only occurs when the servlet is run on the server, not on the development machine.
Thanks!
PS:
It is a Windows Server 2003 Enterprise Server with Tomcat v6 installed.
I finally figured it out.
It turns out that when Tomcat runs it (obviously) is running as a service. The service does not see things the same way as a user does. It turns out that Windows ONLY mounts network drives at the USER level. Therefore, according to the SYSTEM, the drive does NOT exist. The workaround was to use UNC pathnames.
I tried that originally, but it did not work, and the reason for that was because the service did not have correct permissions.
Thanks to everyone who helped me.
http://wiki.apache.org/tomcat/FAQ/Windows#Q7