Peter Bergoff wrote: I am writing servlets with text in them. Every time I have a comma, apostrophe, ampersand or similar characters I have to use the html special characters.
No, you don't. The ampersand, yes, you must use & because it is in the introducer for HTML entities, but commas and most other characters do not need to be HTML-encoded.
Obviously, the angle brackets need to be encoded into HTML entities.