I did find a solution.
Here is my Servlet. The servlet gets invoked when a user tries to access an excel file. The servlet checks permissions and ,reads the excel file and then displays it to the user.
Here is the display part
ServletOutputStream out = resp.getOutputStream();
String path = req.getParameter("Path");
FileInputStream fis = new FileInputStream(path);
<b>resp.setContentType("application/vnd.ms-excel");</b> //this is important so the browser knows to open Excel
BufferedInputStream bis = new BufferedInputStream(fis);
byte[] buffer = new byte[1024];
int l = 0;
while ( (l = bis.read(buffer) ) != -1)
out.write(buffer);
bis.close();
out.flush();
out.close();
}
Also make sure that the server has the MIME type defined for your binary files.
[This message has been edited by Aleksey Matiychenko (edited July 13, 2001).]