Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

On line generation of HTML files  RSS feed

 
kiran nori
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement to generate HTML pages on the fly. The images and the HTML pages are stored in the database. On click of a link I need to select these details from the database and write out the HTML. I don't have a disk space where I can store the files and display the same. PLease send in a mail to my ID at kirannori@yahoo.com
rgds
Kiran Mohan Nori
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm posting my reply here rather than sending e-mail that others won't see.
You can simply hit a servlet that will read the HTML data out of the DB as appropriate, sets the response headers (mime type "text/html"), and emits the text to the response's output stream.
hth,
bear
 
kiran nori
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Bear, But if I havce images in the HTML file how should I throw them ? if possible can you send in a small peice of code to do this.
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kiran nori:
Thanx Bear,
But if I havce images in the HTML file how should I throw them ?

u can call the image through the <img src="path"> tag, after uploading the images on server instead of calling the images from database...in the database only store the path of the image files...
HTH
good luck
malhar
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!