title: Linking to local content in a web application
body: <p>I am working on a replacement application to a legacy application.  Due to certain design limitations of the legacy application, 'attachments' are stored as a String path in our database (generally files stored on a windows shared drive).  The legacy application can then 'open' the attachments by opening a windows command shell and executing the given path.</p>
  
  <p>The legacy (Oracle Forms) application is being phased out by a JSF based J2EE web application.  The new application needs to be able to 'open' or link to these legacy attachments somehow.  Is this even possible?  I have attempted to use file:// URLs, but there are lot of caveats with using them.  They only work on remote hosts in IE, firefox/chrome (and other modern browser I assume) prevent local file URLs.  </p>
  
  <p>Working only on IE is something that can be lived with for this particular feature.  I further ran into an issue with file paths with spaces.  For some reason if IE encounters a filepath with spaces in it, say</p>
  
  <pre><code>C:\Documents and Settings\user123\My Documents\testing\someFile.txt
  </code></pre>
  
  <p>it refuses to open that link.  The browser automatically replaces the spaces (' ') with its URL Encoded '%20'.</p>
  
  <p>The associated link I am attempting looks like:</p>
  
  <pre><code>&lt;a href="file:///C:\Documents and Settings\user123\My Documents\testing\someFile.txt"&gt;link&lt;/a&gt;
  </code></pre>
  
  <p>Is there something simple to this I am missing?  Or is there any easier way of doing this?</p>
  
  <p>I wasn't quite sure what to tag this as so feel free to retag as necessary.</p>