Java Servlet based blog engine
6
stars
20
commits
Java
primary language
Jun 23, 2026
updated
Gram is a personal lightweight blog system. It aims to be the fastest and slickest blog running on Java. It powers theandrewbailey.com.
Gram is optimized for page load speed:
<img loading="lazy">), except for all images of an article on its page, and the first 2 images of the homepage.
site_imagePriority configuration), and dimensions (named image×n). All matched images will be placed in a <picture> element with the original.Security is important!
Gram runs on Java, Payara, Postgres, and Linux (Debian), and written and built with Netbeans. It should run on other Linux distros and Jakarta EE servers without much difficulty (untested), and other databases with a bit of effort.
Gram is a monolith, built with Jakarta EE Servlets, JSPs, and an EJB. This isn't a car shop: no springs or struts here.
(Having trouble? Open an issue on this repository.)
gram.war release and setupUsTheBlog.sh from the repository. Run setupUsTheBlog.sh.
~/gram, and dump most stuff there. (Feel free to create it yourself and put the war and script there.) Payara will be extracted to ~/payara7.gram.war.~/gram/passwords.txt.GramExampleImport_v11_3.zip here.admin_importExport). The script will set this as the gram directory it created.admin_files). The default style isn't great, but it's on purpose.admin_health), with their outputs shown.<link rel="alternate" hreflang="..." href="..."> elements.~/payara7/glassfish/bin/asadmin start-domain gramPayara-xxxxx where gramPayara-xxxxx is the Payara username that the script gave you. (You kept that info, right? I told you it's important!)domain.name") in Payara.
setupUsTheBlog.sh -a domain.name
https://domain.name.I'm using HAProxy in front of Payara to handle port conversions, HTTPS, HTTP/3, and another cache layer. However, I've run Payara directly on the internet with nothing between:
~/payara7/glassfish/domains/gramPayara-xxxxx/config/keystore.p12 which uses the Payara master password (if using the script, it's the same as admin console login). You can setup a HTTPS-only redirect in Configurations > server-config > Network Config > Network Listeners > http-listener-1 > HTTP tab > Redirect Port.The default setup assumes you're running Linux on x86-64 CPUs. If you're not, download the relevant JARs for Brotli4j and zstd-jni.
Gram Blog Engine was formerly known as the Toilet Blog Engine. I changed it because this code's purpose isn't to serve files, but web pages.
20 commits
Hacker News (1)
Java
93.7%
JavaScript
2.5%
Shell
2.4%
CSS
1.4%
Java Servlet based blog engine
6
stars
20
commits
Java
primary language
Jun 23, 2026
updated
Gram is a personal lightweight blog system. It aims to be the fastest and slickest blog running on Java. It powers theandrewbailey.com.
Gram is optimized for page load speed:
<img loading="lazy">), except for all images of an article on its page, and the first 2 images of the homepage.
site_imagePriority configuration), and dimensions (named image×n). All matched images will be placed in a <picture> element with the original.Security is important!
Gram runs on Java, Payara, Postgres, and Linux (Debian), and written and built with Netbeans. It should run on other Linux distros and Jakarta EE servers without much difficulty (untested), and other databases with a bit of effort.
Gram is a monolith, built with Jakarta EE Servlets, JSPs, and an EJB. This isn't a car shop: no springs or struts here.
(Having trouble? Open an issue on this repository.)
gram.war release and setupUsTheBlog.sh from the repository. Run setupUsTheBlog.sh.
~/gram, and dump most stuff there. (Feel free to create it yourself and put the war and script there.) Payara will be extracted to ~/payara7.gram.war.~/gram/passwords.txt.GramExampleImport_v11_3.zip here.admin_importExport). The script will set this as the gram directory it created.admin_files). The default style isn't great, but it's on purpose.admin_health), with their outputs shown.<link rel="alternate" hreflang="..." href="..."> elements.~/payara7/glassfish/bin/asadmin start-domain gramPayara-xxxxx where gramPayara-xxxxx is the Payara username that the script gave you. (You kept that info, right? I told you it's important!)domain.name") in Payara.
setupUsTheBlog.sh -a domain.name
https://domain.name.I'm using HAProxy in front of Payara to handle port conversions, HTTPS, HTTP/3, and another cache layer. However, I've run Payara directly on the internet with nothing between:
~/payara7/glassfish/domains/gramPayara-xxxxx/config/keystore.p12 which uses the Payara master password (if using the script, it's the same as admin console login). You can setup a HTTPS-only redirect in Configurations > server-config > Network Config > Network Listeners > http-listener-1 > HTTP tab > Redirect Port.The default setup assumes you're running Linux on x86-64 CPUs. If you're not, download the relevant JARs for Brotli4j and zstd-jni.
Gram Blog Engine was formerly known as the Toilet Blog Engine. I changed it because this code's purpose isn't to serve files, but web pages.
Hacker News (1)
20 commits
Java
93.7%
JavaScript
2.5%
Shell
2.4%
CSS
1.4%