A dynamic web page combines shared static elements with content generated from runtime data. In server-side rendering, a template engine inserts application data into a template and returns HTML to the browser. section 7.1 section 7.3
An Actix Web and Tera request follows this path:
- Create a Tera context and insert values such as a user's name. section 7.3
- Render the template with that context, then return the result as an HTML response. section 7.3
Personalized bank greeting
A shared bank template contains {{ name }}; inserting “Bob” produces “Welcome Bob, to XYZ bank home page!” The page can retain common styling while displaying user-specific content. section 7.3 section 7.1
<!DOCTYPE html>
<html>
<head>
<title>XYZ Bank Website</title>
</head>
<body>
<h1>Welcome {{ name }}, to XYZ bank home page!</h1>
<p>This is an example of a dynamic web page served with Actix and
Tera templates.</p>
</body>
</html>
Inspect the Tera HTML template and its name placeholder. section 7.3

