This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Servlets and the fly likes HTML Generation in Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTML Generation in Servlets" Watch "HTML Generation in Servlets" New topic

HTML Generation in Servlets

Hemanth Presingu
Ranch Hand

Joined: Oct 01, 2000
Posts: 30
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.
Paul Wetzel
Ranch Hand

Joined: Nov 02, 1999
Posts: 107
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
I agree. Here's the link:
subject: HTML Generation in Servlets
It's not a secret anymore!