35811

Links to network drive doesn't work in standalone Tomcat, but works in Eclipse+Tomcat

Question:

I'm trying to create hyperlinks to open files from network drive G: (more details <a href="https://stackoverflow.com/questions/32970810/open-file-from-network-drive" rel="nofollow">here</a>). G: is mapped as network drive.

<ul><li>When I deploy the WAR on Tomcat server integrated to Eclipse, <strong>it works</strong>.</li> <li>When I deploy it on the same but standalone Tomcat itself, <strong>it doesn't work</strong></li> </ul>

I've tried:

<ul><li>Run Tomcat as Domain Admin, which has an access to the location, but <strong>without success</strong>. </li> <li>Run it as Local user, but check the box Allow service to interact with desktop. Also <strong>without success</strong>.</li> </ul>

What's the difference in access between integrated Tomcat and Tomcat itself?

<strong>SOLUTION:</strong>

<ul><li>Case Eclipse + Tomcat: Path G:/test_dir/test.txt <strong>works</strong> </li> <li>Case Standalone Tomcat: Path \\\\server\\g\\test_dir\\test.txt <strong>works</strong> </li> </ul>

Answer1:

It is possible that you cannot access shared network drive because account that runs standalone Tomcat does not have enough privileges.

I had a similar issue (running Tomcat as a Windows service) that couldn't access shared network drive because service was running with local admin account that didn't have access to shared network drive.

Since you are on Windows, try running Tomcat as a domain user that has access to a network drive.

Answer2:

<strong>SOLUTION:</strong>

<ul><li>Case Eclipse + Tomcat: Path G:/test_dir/test.txt works</li> <li>Case Standalone Tomcat: Path \\\\server\\g\\test_dir\\test.txt works</li> </ul>

Recommend

  • create NodeSet in XSLT from PHP function
  • Typescript: How to map over union array type?
  • Enabling CORS using Spring Boot 1.3.3-RELEASE
  • get back to normal after the traverse in threejs
  • Fill SVG path with a background-image without knowing height&width
  • Giving security priviliege to a scheduler in Java EE 6
  • Objective C IBOutlets
  • Why is django manage.py syncdb failing to create new columns on my development server?
  • Wrapping text in spinner android
  • Any nice way to generate a timeline view of commits from subversion?
  • Local Development, Apache vs Developer - file permissions
  • Changing Jupyter Notebook start up folder by modifying “start in” not working any more
  • Configure nginx to return different files to different authenticated users with the same URI
  • How to override value that appears in a dropdown in the rails_admin gem
  • jwtBearer bearer token with rc-1 update to ASP.Net 5
  • nonblocking BIO_do_connect blocked when there is no internet connected
  • ADO and msqli connections very slow
  • Should I or shouldn't I use the CachingConnectionFactory with hornetq 2.4.1
  • PHP buffered output depending on server setting?
  • Email verification using google app script and google forms
  • Get data from AJAX - How to
  • Bug in WPF DataGrid
  • How to recover from a Spring Social ExpiredAuthorizationException
  • SSO with signing and signature validation doesn't work
  • ILMerge & Keep Assembly Name
  • Large data - storage and query
  • WOWZA + RTMP + HTML5 Playback?
  • SVN: Merging two branches together
  • Hibernate gives error error as “Access to DialectResolutionInfo cannot be null when 'hibernate.
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • How to get icons for entities from eclipse?
  • How do you join a server to an Active Directory (domain)?
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Can Visual Studio XAML designer handle font family names with spaces as a resource?
  • Authorize attributes not working in MVC 4
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]
  • Busy indicator not showing up in wpf window [duplicate]
  • costura.fody for a dll that references another dll
  • Python/Django TangoWithDjango Models and Databases
  • Net Present Value in Excel for Grouped Recurring CF