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.
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.
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
C:Documents and Settingsuser123My DocumentsestingsomeFile.txt
it refuses to open that link. The browser automatically replaces the spaces (' ') with its URL Encoded '%20'.
The associated link I am attempting looks like:
<a href="file:///C:Documents and Settingsuser123My DocumentsestingsomeFile.txt">link</a>
Is there something simple to this I am missing? Or is there any easier way of doing this?
I wasn't quite sure what to tag this as so feel free to retag as necessary.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…