The space character is not allowed in a URL, so you have to replace them with '+' the URL-encoded form of spaces:
The
File:/// will be added as a replacement for
http:// on the client side.
Note that this only works when you try to visit the page from the SAME computer as the server is running for. The file being linked to will be present on the SERVER, not the CLIENT, but a
file:// url will try to find a file on the CLIENT's computer. If you want to be able to access the link from other computers you would have to move the file into your web application's working directory (Web App path).
This is also a display feature, so
you should be making links/displaying values in JSPs, not Servlets.