• Post Reply Bookmark Topic Watch Topic
  • New Topic

help with rendering html with derby based data on the fly  RSS feed

 
krillian konstatos
Ranch Hand
Posts: 49
Java Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranch!

I have an application in which i need to print html document on the fly. There is going to be one document for every section in
a contact manager. i have a derby database that takes care of the user data and i want to display this data in the recently
mentioned html documents. I am working on a parser that will look for a specific element in the hypertext document where
i will print out data from the database such as headlines, images and blocks of text elements. Am i thinking in the right direction?
So far i have a class that creates html files in a directory on the fly if they not exists. The application first deletes theese
files on startup and then creates and process them. I am stuck when it comes to find the correct way to print out the html data
in theese documents and to process the html data. It is my goal to do this just as when you are creating xml documents
from the dom package. I want to do this using the javax.swing.text.html packages in java and not just with the io writer classes.
I am displaying the files in a JEditorPane through nodes in a jtree component. The hard part right now is to figure out a way
to process the data within the documents in a similar manner to the processing of a xml document. I will return later with some
source code but right now i need to be pinched a little at certain directions and not just my own i am a complete mushroom
when it comes to html parsing using java ...

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you considered using a templating engine such as Apache Velocity or FreeMarker?
 
krillian konstatos
Ranch Hand
Posts: 49
Java Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Have you considered using a templating engine such as Apache Velocity or FreeMarker?


It sounds like this is what i am looking for as a solution. I am at a googling phase right now but can you tell me
more about how theese techniques works or post some links?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The sites for both projects have extensive documentation online that includes introductory material; it would just be a duplicated effort to post anything here.
 
krillian konstatos
Ranch Hand
Posts: 49
Java Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:The sites for both projects have extensive documentation online that includes introductory material; it would just be a duplicated effort to post anything here.


I am looking over Velocity right now after i have downloaded the zip file from the apache site. It contains a jar file that i must add to the classpath so that
my application can use it. But i am uncertain when it comes to license issues when you are using external tools. Where should i present theese licenses
in my distributed files? i am a beginner at deployment issues.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where should i present theese licenses in my distributed files?

There's no general answer to that, because it depends on the license on question. Mae sure you read the license of each package you use carefully; it will tell you under which circumstances, and in what way, you may redistribute the software. you should familiarize yourself with the major open source licenses (Apache, BSD, GPL, LGPL, Affero GPL, etc.) so you know what's involved; they all have Wikipedia pages that cover the basics.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!