This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

from java to HTML  RSS feed

 
meeraa pillaii
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

I want to create one html page.html page template is located in another folder.Input for this HTML file should come from one java program using swing.

Can anybody give me logic or step to do this

thanks in advance
 
Rodrigo Tomita
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Well... I think it depends on how complex your template is and how flexible you want your solution to be. You can simply open the template file and replace the values, writing it to another file. Classes from the API you may want to look at include FileReader, FileWriter, and String itself.

Or, you can use a 3rd party library for that. Apache Velocity is an example of one (although I haven't used it myself).

Hope it helps.
 
meeraa pillaii
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!