SSI (Server Side Includes) are directives that are placed in HTML pages, and evaluated on the server while the pages are being served. They let you add dynamically generated content to an existing HTML page, without having to serve the entire page via a CGI program, or other dynamic technology.
The decision of when to use SSI, and when to have your page entirely generated by some program, is usually a matter of how much of the page is static, and how much needs to be recalculated every time the page is served. SSI is a great way to add small pieces of information, such as the current time. But if a majority of your page is being generated at the time that it is served, you need to look for some other solution.
I need to include a license agreement into a textarea. The boilerplate license agreement will exist as a text file, but it needs to be personalized. For example, where it reads "COMPANY will agree to..." in the text file, needs to be replaced with the actual company name entered by the customer at an earlier place in the web application. So, it might end up being displayed back to the customer as "XYZ Corp will agree to...". I thought about reading it in as a FileInputStream, and then parsing through it to perform the necessary string replacements (personalization), but I'm wondering if using filters would be a more elegant solution. I'm new to this and haven't even read the chapter on filters. If filters would be the best approach then I can read the chapter & do it that way. What is the best way to do this?