Results 1 to 4 of 4
- 02-15-2011, 05:57 PM #1
Member
- Join Date
- Feb 2011
- Posts
- 3
- Rep Power
- 0
displaying images that are out side the scope of web/application server.
hey guys,
i am developing a website for pictures. now that problem that i am facing is that i have images in C drive of my windows PC. now i want those images to be displayed on my jsp pages. is it possible to do that ?
is it possible to implement a servlet that would write the images to jsp pages ?
- 02-15-2011, 08:05 PM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,608
- Rep Power
- 5
Have a servlet which serves the image file, reading the file, outputting the appropriate header for an image, then writing the image out (lots of tutorials online for how to do this). In the jsp page, just use a basic html img tag to link to the image. Note that if you are reading (and outputting) the contents of files on you hard drive, I'd recommend some security filter to prevent someone from doing so with files other than the image files you want to display
- 02-16-2011, 07:39 AM #3
Member
- Join Date
- Feb 2011
- Posts
- 3
- Rep Power
- 0
thanks alot bro. can u tell me a link for the tutorial ? i googled it but no luck
- 02-16-2011, 03:18 PM #4
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,608
- Rep Power
- 5
Similar Threads
-
forward request url from server side
By ragavendran in forum Java ServletReplies: 1Last Post: 11-30-2010, 03:28 PM -
Put hashmap in application scope ?
By Narendra_ipace in forum Advanced JavaReplies: 1Last Post: 11-23-2010, 07:56 AM -
how to countdown on server side
By BigBear in forum Java ServletReplies: 3Last Post: 04-26-2010, 10:33 PM -
how to access Ms Access from client side to server side
By arunkumarinfo in forum JDBCReplies: 1Last Post: 03-20-2010, 07:03 PM -
Accessing local file from server side using Java Application
By ersachinjain in forum JDBCReplies: 9Last Post: 09-01-2009, 07:17 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks