How to make Tomcat/Catalina TLDScanner ignore a bunch of JARs

This was just an annoying message for some web apps I’ve been maintaining. I couldn’t get it to just ignore the directory so here’s how I enumerated all the JARs. My web apps are all stored in /opt/tomcat/webapps. YMMV.

grep -oE "/opt/tomcat/webapps/\S+\.jar" /opt/tomcat/logs/catalina.out | awk -F/ '{print $NF",\\"}' | sort | uniq

Then just copy/paste the results in /opt/tomcat/conf/catalina.properties under the tomcat.util.scan.StandardJarScanFilter.jarsToSkip key and restart the server.

systemctl restart tomcat && tailf /opt/tomcat/logs/catalina.out

Happy serving!

How to develop websites with Astro + Docker + ChromeOS

I was reading StackShare’s Top Developer Tools 2022 and noticed Astro is the #1 tool so figured I should check it out. I use an Acer Spin 713 Chromebook for my daily driver and it works pretty well for local dev, but it does have a few quirks, namely that the dev environment runs in its own containerized environment so you have to keep track of things like the container IP.

# Get the IP address of the Crostini container
IP_ADDR=$(ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')

Next, start up a Node container. (If you don’t have Docker installed, follow this blog post.)

# Run the container
docker run -it --rm --entrypoint bash -p 3000:3000 node

Once you’re in the container, initialize a new Astro app.

npm create astro@latest
# say yes to the prompts

Run the app. The -- --host 0.0.0.0 is important.

npm run dev -- --host 0.0.0.0

Now jump into your browser, plug in http://${IP_ADDR}:3000, and you should be good to go.

So that’ll get you going. Now get to web devving!

Design a site like this with WordPress.com
Get started