# mustachelet **Repository Path**: mirrors_spullara/mustachelet ## Basic Information - **Project Name**: mustachelet - **Description**: Servlet for serving Mustache based templates with backing Java code - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-26 - **Last Updated**: 2025-12-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Mustache gives you a great way to generate HTML, this wraps that up in a Servlet so you can do it quite easily. Here is an example: Backing code (Index.java): @Path("/") @Template("index.html") public class Index { @Controller boolean exists() { return true; } String name() { return "Sam"; } } Template code (index.html): Index Hello, {{name}}! The POST use case is a little more involved. Here is the post mustachelet: @Path("/post(/(.*))?") @Template("post.html") @HttpMethod({GET, POST}) public class Post { @Request(RESPONSE) HttpServletResponse response; @Request(REQUEST) HttpServletRequest request; @Controller(POST) boolean redirectPostData() throws IOException { response.sendRedirect("/post/" + request.getParameter("value")); return false; } @Request(MATCHER) Matcher m; String value() { return m.group(2); } } With its associated template: Post