Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

File linking  RSS feed

 
Sandeep Patel
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!