I want to be able to generate html pages where some parts of the html should depend on some parameters.
My idea is that I could have a template like OneMailTemplate.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>MailTemplate</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Bla bla bla</p>
<someComponent>
<p>Bla bla</p>
</body>
</html>
and then get some method to replace the tag
<someComponent>
with some generated html code.
Is there a way to do this in java without the use of StringTokenizer?
I am also open to suggestions about how I can do this in another way.