The moose likes Groovy and the fly likes groovy's html builder.... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Other Languages » Groovy
Reply Bookmark "groovy Watch "groovy New topic
Author

groovy's html builder....

Vimala Shirur
Greenhorn

Joined: Jan 12, 2001
Posts: 12
How to use groovy's html builder to include css file, table stuff, image stuff etc.,

Could someone show me an example how to do this?

Appreciate your response!

Thanks.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4695

The two code snippets below represent:
1) a script that builds the html markup and then outputs the contents with println writer.toString()
2) the result html

The example includes css, a table, and an image.



[ July 04, 2008: Message edited by: Marc Peabody ]

A good workman is known by his tools.
Vimala Shirur
Greenhorn

Joined: Jan 12, 2001
Posts: 12
This helps. Thanks!
Matthew Taylor
Rancher

Joined: Jun 13, 2004
Posts: 110
Vimala,

If you are doing this sort of thing a lot, I would recommend checking out Grails, which is a web framework build using Groovy and Java. It uses GSPs (like JSPs) for this sort of work,


Grails Consultant
http://dangertree.net
 
 
subject: groovy's html builder....
 
developer file tools