This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

groovy's html builder....

 
Vimala Shirur
Greenhorn
Posts: 12
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Vimala Shirur
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This helps. Thanks!
 
Matthew Taylor
Rancher
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic