File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes File linking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "File linking" Watch "File linking" New topic

File linking

Sandeep Patel

Joined: Jan 16, 2009
Posts: 11
how to link a file ( which can be any thing an Excel or a Word document) in JSP code? But in the file i want to take values from database (oracle 9i)? How should i go about?
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
You can use the HTML <a> element for this. It should point to a valid URL of the file. Which can just be a public resource or a Servlet which reads an inputstream of the file from somewhere (local file system or database or auto-generated) and writes it to the outputstream of the response.
I agree. Here's the link:
subject: File linking
It's not a secret anymore!