K
kevincw01
I have a requirement to create an app that can generate static html
webpages. The app must be stand alone as I cannot just serve the pages
from an application server like jboss or tomcat. My prototype is as
follows.
I use velocity from the apache foundation as my template engine and xml
and xsd for the data that goes into the template. I have pre-compiled
JAXB classes generated from several xml schemas(xsd) which I use to
unmarshall the xml data into a java bean/object which is then merged
with the velocity template and results in the html output.
The problem I have is that the end-user admin of the app must not have
to know java to create new types of pages. Here's the scenario for an
admin creating a new template/page-type:
1. Create a new velocity template(no problem)
2. Create new XML schema and associated xml data(no problem)
3. Generate the JAXB classes for the schema(ant task, no problem)
4. Reference these new classes in the app so that it can unmarhsal the
xml data to a bean and give it to velocity(uh-oh).
My problem is obviously #4. I was thinking of having a properties file
where the admin could specify the jaxb generated classes for this
particular page type. But...wouldn't I then need to add the import
statments into the application code, change the bean data type and
re-compile the main application? This would be unacceptable given the
requirement that the admin wouldn't know java.
thanks for your tips,
Kevin
webpages. The app must be stand alone as I cannot just serve the pages
from an application server like jboss or tomcat. My prototype is as
follows.
I use velocity from the apache foundation as my template engine and xml
and xsd for the data that goes into the template. I have pre-compiled
JAXB classes generated from several xml schemas(xsd) which I use to
unmarshall the xml data into a java bean/object which is then merged
with the velocity template and results in the html output.
The problem I have is that the end-user admin of the app must not have
to know java to create new types of pages. Here's the scenario for an
admin creating a new template/page-type:
1. Create a new velocity template(no problem)
2. Create new XML schema and associated xml data(no problem)
3. Generate the JAXB classes for the schema(ant task, no problem)
4. Reference these new classes in the app so that it can unmarhsal the
xml data to a bean and give it to velocity(uh-oh).
My problem is obviously #4. I was thinking of having a properties file
where the admin could specify the jaxb generated classes for this
particular page type. But...wouldn't I then need to add the import
statments into the application code, change the bean data type and
re-compile the main application? This would be unacceptable given the
requirement that the admin wouldn't know java.
thanks for your tips,
Kevin