This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML Generation in Servlets

 
Hemanth Presingu
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Dynamic HTML pages with Data coming from a DB, how can we efficiently generate the HTML code from the servlets.
Is there an easy way to embed data into a pre defined html form easily. One problem i am facing is a html page has lot of double quotes in the html code and it is a big chore to convert all the double quotes to single quotes when generating the HTML string.
I was just curious how everyone else is doing this.
-Hemanth
 
Paul Wetzel
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your best bet is to use a combination of jsp and servlets. Put you presentation logic in the jsp and data/backend logic in your servlets. It makes things easier to maintain as well.
good luck
paul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic